|
|
|
|
|
by PaulHoule
1911 days ago
|
|
A paricular point people don't get is that Java joined functional programming instead of beating it. The Hotspot compiler was based on a research runtime for a functional language. Type inference is basically the same as ML family languages. With heavy use of Lambdas and higher-order functions some of my Java looks like ML. If i want to have functions like maybe(x, f1, f2, ...)
that works (emphasis) like the maybe monad my codegen writes the boilerplate out to arity 30. (Funny the codegen lets you write Java in a Java DSL that looks like typed S-expressions.) |
|
My POV ("Writing functional stuff in Java is a headache") gets lost between the much larger camps of "Functional bad, Java good" and "Java is functional and therefore good". Or worse "Java is better because it's both OO and FP".
I want to type inference to work as well as ML. I don't think it ever will.
I want to be free of nulls. I don't think I ever will be.
I want the language to just let me implement `interface Monad<A>` and not need to generate code to arity 30.