3 ms·
Elm! (Currently.) I might have said Haskell, except I have very little hands on experience with Haskell. Elm is such a joy. Here are some reasons! 1. In the
by PaulStatezny 9y ago
Elm! (Currently.)
I might have said Haskell, except I have very little hands on experience with Haskell.
Elm is such a joy. Here are some reasons!
1. In the end, all your code is either functions or data!
2. There are only a few core concepts, and very little extra language features. There is zero implicit indirection. (E.g. macros or class inheritance.) As a result, it’s incredibly easy to reason about what the code is doing.
3. It’s incredibly straightforward to reason about what code is doing. Function bodies are just a single expression saying what the function returns. Functions are 100% “pure”; they don’t perform side effects, and when you pass in the same input you always always get the same output.
I work in Elixir day-to-day. Elixir’s great, but just today I spent hours digging through internals of Phoenix (the prevailing web framework) to implement a “low level” abstraction in our application. Trying to understand the flow of code in Phoenix was painful! (Because a lot of advanced language features are used that bring more layers of indirection.) Not so in Elm. There’s no objects, no classes, no inheritance hierarchies. Everything is way more concrete and clear from the get go.
- dhruvkar 9y agoi'm just starting to learn elm. are there any cases where elm was not the ideal solution but js was?