4 ms·
Interoperating with Java was a requirement. That immediately takes simplicity off the table if the goal is to bring FP to the JVM.
by pohl 3y ago
Interoperating with Java was a requirement. That immediately takes simplicity off the table if the goal is to bring FP to the JVM.
- macintux 3y agoAdmittedly this is from a distance, having only toyed a bit with each, but Clojure always seemed much simpler than Scala.
- pohl 3y agoThat follows from Clojure being dynamically typed, though. Different design constraints lead to different results.
- bigbillheck 3y agoWhy's that?
- switchbak 3y agoTypes interop on a VM that wasn't designed for a more complex one like Scala has. Collections interop between Java<->Scala. Scala's (immutable/mutable) collections are not built on the Java ones, and they provide helpers to translate between the two. Calling conventions, name mangling, Java to Scala issues, etc.
- fulafel 3y agoFP doesn't need complex type systems though. And there's not a lot of type stuff on the JVM level, it's more dynamic than you'd think.
- switchbak 3y agoI’m not defending Scala design just describing the interop challenges given said design. Scala was certainly envisioned with a strong type system in mind. The JVM doesn’t mandate mandate that, true, but the compiler they wrote did.