Document details

Java stream fusion: Adapting FP mechanisms for an OO setting

Author(s): Ribeiro, Francisco ; Saraiva, João ; Pardo, Alberto

Date: 2019

Persistent ID: https://hdl.handle.net/1822/68620

Origin: RepositóriUM - Universidade do Minho

Subject(s): Functional Programming; Object-Oriented Programming; Program Fusion


Description

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.

Document Type Conference paper
Language English
Contributor(s) Universidade do Minho
facebook logo  linkedin logo  twitter logo 
mendeley logo

Related documents

No related documents