For the past several weeks I’ve learned the great language of Elm and I would like to share why I think it is so promising and capable of influencing the future of web development.
- Great performance
- No run-time errors
Like reactJS, Elm uses a virtual DOM in order to optimize page loading. Here are some statistics regarding the speed of Elm.
It seems to beat the greatest web technologies. You can read and review the methodology if you feel skeptic, here.
No run-time errors
undefined, it is not so far from what elm does.
I personally feel that slowly programmers start to realize that OOP is not so good as once we used to think. This is due to encapsulation, which is one of OOP’s core principles. Encapsulation is the binding of data and functions together as one structure we call Object. Very briefly it is bad due to unexpected state changes. When a programmer in OOP writes a method that alters the object’s state, he has to keep in mind that there may be other methods that alter the state as well, methods he didn’t know exists in many cases…
Elm deals with this issue with various ways. First of all there are no objects. There are Data Types and there are Functions and they are fully separated. Second, every variable in Elm is immutable , meaning it cannot be changed after declaration. This prevents the unexpected side-effects that can alter the variable without a programmer’s awareness. Moreover it causes one to carefully think before he gives a name to a variable. I find it also empowering the
= operator. For example if we say in elm that
a = b + c
it means that without doubt, no matter what happens in the program,
a will always be equal to
One powerful syntax
Future content in the blog
The only way to make sense out of change is to plunge into it, move with it, and join the dance.
Liked the article?