> In fact, Java does not even allow the programmer to define custom values. All values are primitives or object identities.
Immutable objects do not have identity and are values. And the distinction between primitives and objects in Java, for our discussion here, is irrelevant.
That the language does not enforce purity in any way (besides `final` members and values) that's irrelevant. A lot of things in programming happen by convention.
That Haskell can force purity via its laziness, that's a nice feature of the language, but not required for doing FP, just like how static types aren't required for doing FP either — Haskell devs would like to promote the notion that Haskell and derivatives are the only true languages for FP, but they've been preceded by LISP and ML.
A lot of things in programming happen by convention. That's not a good argument, or an argument that can be used efficiently for language advocacy. OOP isn't supported explicitly by C either, yet people have built an entire GUI/window manager, along with apps, on top of GObject, which in many ways is more OOP than C++ ;-)
> And the distinction between primitives and objects in Java, for our discussion here, is irrelevant.
All it takes to disabuse you of this notion is a little bit of reflection.
> That Haskell can force purity via its laziness
This is not true. Purity is enforced via the type system.
> but not required for doing FP, just like how static types aren't required for doing FP either
Completely agree here.
> but they've been preceded by LISP and ML.
ML is a functional language. Scheme already forces you to squint your eyes a lot. Lisp is not a functional language by any stretch of the term's meaning.
Even if their encoding has identify, immutable value don’t need it. Languages like C# allow you to throw off identity altogether with pass/store by value structs.
> Even if their encoding has identify, immutable value don’t need it.
Values indeed don't have physical identities. The problem is that, when you use a language with pervasive object identities, the values you want only exist in your head, not in the semantics of the language you are using.
> Languages like C# allow you to throw off identity altogether with pass/store by value structs.
Please teach me how to define list or tree values in C#, sensei.
Immutable objects do not have identity and are values. And the distinction between primitives and objects in Java, for our discussion here, is irrelevant.
That the language does not enforce purity in any way (besides `final` members and values) that's irrelevant. A lot of things in programming happen by convention.
That Haskell can force purity via its laziness, that's a nice feature of the language, but not required for doing FP, just like how static types aren't required for doing FP either — Haskell devs would like to promote the notion that Haskell and derivatives are the only true languages for FP, but they've been preceded by LISP and ML.
A lot of things in programming happen by convention. That's not a good argument, or an argument that can be used efficiently for language advocacy. OOP isn't supported explicitly by C either, yet people have built an entire GUI/window manager, along with apps, on top of GObject, which in many ways is more OOP than C++ ;-)