Concepts to help developers master JavaScript
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 typesNo type coercionNo == vs ===, although typeof has a simpler equivalentBasically all expressions and no statementsNo hoisting as suchNo prototypical inheritance or prototype chainNo Object.create, no destructive alternative to Object.assignNo factories or classes as suchNo inheritance or polymorphismNo design patterns as such, though you could argue that abstract algebra or category theory are the replacementsNo this, call, bind, or applyThe 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.