|
|
|
|
|
by G4BB3R
1747 days ago
|
|
The cause is not being functional, but having dozens of extra features and multiple syntaxes for the same thing, both Scala and Haskell suffer from that. On the other hand OCaml is very fast and Elm is the fastest compiler I've ever seen.
Edit: oops there was already a similar comment when I posted |
|
Compared to the other languages you mention there, I'm not surprised that Elm has the fastest compiler; compiling to an actual binary (or something low-level like JVM bytecode) definitely seems like it would take more work to compile to than something much higher level like JavaScript, especially if you're performing optimizations at each intermediate layer. That's not to knock Elm though; obviously having a fast compile time is a good thing regardless of the reason, and it certainly still would be possible for someone to accidentally write a slow compiler to JavaScript!