Poor Java

bearophile bearophileHUGS at lycos.com
Sat Dec 13 14:48:45 PST 2008


This shows how much some poor Java programmers today feel the need for a bit more functional-programming in their language:
http://jedi.codehaus.org/Examples
But they are going to fail.

That page also shows why array/lazy comprehensions will be a very good thing to add to D (I'm waiting for an answer from Walter about this topic still):
http://en.wikipedia.org/wiki/List_comprehension

Just to note that it's not something used by a single exotic language, I can list some of the growing number of languages that today support them (usually in not lazy way): Haskell, Erlang, Python (and derived languages like Boo, Cobra, maybe Wirbel, etc), Scala, F#, Visual Prolog, C#, Clojure, JavaScript.

(In that Wikipedia page you can also see that while several languages support them, the syntax used by Python is by far the best).

Lazy generator expressions can also be used inside associative arrays.

Bye,
bearophile



More information about the Digitalmars-d mailing list