|
Well, Scala was originally designed to complement a platform that encourages mutable data structures. When Scala was first getting started, Java didn't have anonymous functions yet, and it was a different time. Currently, Scala-Native is working on off-JVM Scala, Scala.js is already plenty capable of compiling to efficient JS, and when wasm lands, it'll probably manage that rather easily. Elm is a neat language, but I think it sort of presents too wide a divide. I have the same problem with Elm as I do with Typescript, Dart, and all of the other languages that recognize JS is a shit language, but just compile to it anyways. Scala is a VERY well-designed language, and FP/OOP isn't nearly as polarizing as it might seem. I'd recommend LearnXinY Scala, read a little bit and you might see how natural it actually is (excluding the obnoxious syntax for certain things) But yeah, JS has always been the crucial problem that needs to be solved. *.js is never going to solve it. |
What I'm getting at is that OOP+FP is, ultimately, simply OOP, providing none of the guarantees and encouraging none of the best practices that purely FP langs do. It's like the worst of both worlds lol
</opinion>