What language features in Java came from Haskell?
What language features in Java came from Haskell?
Can you name any design characteristics in Java's stream API that came from Haskell, rather than were already common in many languages when Haskell itself was designed? I can't.
It does conventional inlining and combining loop bodies, which can in some trivial cases achieve the same effect, but these are techniques you'd find in any compiler or even an 80s text book - they didn't come from Haskell.
Here's the limitation of Java's 'fusion' - you'll notice there's no pass to do this in Hotspot - it just happens due to the inlining and GCM passes.
https://github.com/openjdk/jdk/blob/883a4f65b9b1533c8a51d156...
And here's a paper on trying to add actual Fusion to Java, which they wouldn't be doing if Java had it already.
https://dl.acm.org/doi/pdf/10.1145/3355378.3355386?download=...
Once in reference to something that they didn't do (algebraic types), and once in reference to that both Haskell and their work were being inspired by an earlier common idea (System F) from the early 1970s.
I hear you though. I was mostly a lisp person and only really got into Haskell in the last couple of years. Even still I would have said that the FP zeitgeist had Haskell as it’s central example of FP.
For example, this ya the earliest reference to clojure I could find on hn. Notice the text of the announcement and how it focuses on parallelism https://groups.google.com/forum/m/#!topic/comp.lang.lisp/xvK...