Java Stream Fusion: Adapting FP mechanisms for an OO setting

Thumbnail Image
Date
2019
Authors
Pardo,A
João Alexandre Saraiva
Francisco José Ribeiro
Journal Title
Journal ISSN
Volume Title
Publisher
Abstract
In this paper, we show how stream fusion, a program transformation technique used in functional programming, can be adapted for an Object-Oriented setting. This makes it possible to have more Stream operators than the ones currently provided by the Java Stream API. The addition of more operators allows for a greater deal of expressiveness. To this extent, we show how these operators are incorporated in the stream setting. Furthermore, we also demonstrate how a specific set of optimizations eliminates overheads and produces equivalent code in the form of for loops. In this way, programmers are relieved from the burden of writing code in such a cumbersome style, thus allowing for a more declarative and intuitive programming approach.
Description
Keywords
Citation