3 ms·
> Java is, or soon will be, a nominally-typed ML-ish (which isn't saying all that much given how many languages were inspired by ML). Sorry, but I call bullshi
by Tainnor 4y ago
> Java is, or soon will be, a nominally-typed ML-ish (which isn't saying all that much given how many languages were inspired by ML).
Sorry, but I call bullshit. As long as reflection is a huge part of major frameworks, libraries are loaded at runtime and mutability is the default for basically everything... there's just a world of difference between the two.
- pron 4y agoI'll give you mutability by default, but I don't see why dynamic linking and reflection matter all that much (parametricity is not celebrated by the MLs as much as it is in Haskell). I think that the biggest fundamental difference between ML and Java is that ML's type system is primarily structural while Java's type system is primarily nominal. That's why I certainly wouldn't say Java is an ML (not even as much as Clojure is a Lisp), only that, like many other languages, it's ML-ish. It is no accident that virtually all of Java's biggest language features added since 1.0 -- generics, lambdas, ADTs, and pattern-matching -- were directly inspired by ML (although Java, which seeks to be a last mover, usually waits for several languages to adopt a feature before considering it).