5 ms·
Ad 3) Scala is quite a bit older than the others, I'd put it in a previous generation. I always saw Kotlin as a more convenient Java, without Scalas heavy til
by the_duke 2y ago
Ad 3)
Scala is quite a bit older than the others, I'd put it in a previous generation.
I always saw Kotlin as a more convenient Java, without Scalas heavy tilt towards FP.
Java also added the equivalent of sum types with sealed interfaces and exhaustive pattern matching, does that make Java an ML language?
Many older languages by now have incorporated valuable parts of FP/ML (including Javascript, Java, C++, ...)
Borrowing some concepts from ML doesn't put these languages in the ML family.
- SSLy 2y ago> does that make Java an ML language? not really, the type-system-sublanguage is still modelled like classy OOP, not more like MLy modules.
- nextaccountic 2y agoBut Kotlin is like this too.
- SSLy 2y agoIndeed, and Scala (at least the version I've tried 10 years ago) tries to do both, somewhat poorly. shrug
- valenterry 2y agoPersonally I found Scala's module/import system to be really really good. There are some annoying things with it, but they mostly come from JVM/Java compatibility.
- SSLy 2y agoYeah, it's the compat that I vaguely recall being kludgy.
- valenterry 2y agoOCaml is older than Scala though. > Java also added the equivalent of sum types with sealed interfaces and exhaustive pattern matching, does that make Java an ML language? I don't think so. Java heavily relies on mutation and you can see this throughout the whole ecosystem and even the JVM whereas OCaml doesn't. Kotlin also relies on mutation (it relies on Java's stdlib after all) whereas Scala has its own stdlib with both mutable and immutable classes but defaulting to immutability almost everywhere. So if anything, Scala can be called an ML language imho.