Re:Functional Reactive Programming in Java
by hepta on Thursday October 22, 2015 @12:56PM
(#10433300)
Both Clojure and Scala work on the JVM, both have lazy sequences, Scala even has lazy evaluation. It's not the same as fusion, but it's not unnecessary iteration either. These are not invalidated by being on the JVM, Java can do some of these as well.
[ Parent
| on HN ]
Re:Functional Reactive Programming in Java
by jerven on Thursday October 22, 2015 @02:16PM
(#10433867)
I know that the Graal JIT guys are working on chained function call fusing for inlining when generating machine code etc... But I am not sure that is what you call "fusion". There is definitely only one iteration over the collection in the example style code.
Stream fusion (in Haskell) is the removal of intermediate lists created when you chain multiple list functions (map, filter, fold, etc).
https://donsbot.wordpress.com/2008/06/04/haskell-as-fast-as-...