| One intuition I’ve had while learning Elm is that it’s a fundamentally simpler language with a smaller number of concepts to learn than JavaScript. In this list of 33 JavaScript concepts, I count 11 that either do not exist in Elm or, like Object.assign, do not have an alternative to worry about: No reference types No type coercion No == vs ===, although typeof has a simpler equivalent Basically all expressions and no statements No hoisting as such No prototypical inheritance or prototype chain No Object.create, no destructive alternative to Object.assign No factories or classes as such No inheritance or polymorphism No design patterns as such, though you could argue that abstract algebra or category theory are the replacements No this, call, bind, or apply The finer points of these are somewhat debatable, but overall my contention is that removing mutation and local state makes a lot of related concepts just fall away. A takeaway is that when someone tells you that they’ve learned Elm, you needn’t assume that this was as huge of an undertaking as learning JavaScript. |
Sure, but elm has its own issues with comparison as these are essentially implemented as a compiler hack, and only comparable (ie primitive or lists/tulles thereof) types can be used as keys for the built in map type (so you need to know about primitive types too)