2 ms·
> helps reveal its simple and elegant semantics JS semantics are neither simple nor elegant. There's a reason there are whole books dedicated to avoiding certa
by stefano 7y ago
> helps reveal its simple and elegant semantics
JS semantics are neither simple nor elegant. There's a reason there are whole books dedicated to avoiding certain parts of the language, and it's not the syntax.
For example, the syntax of the == operator is trivial. Its semantics however is complex and inelegant (it looks like an equality operator, but it doesn't express an equality relationship).
- erokar 7y agoI'm familiar with JS' warts, which can be avoided. At the same time JS has e.g. functions as first class objects, few and simple types, object and array literals, and a prototype based OO. This makes its semantic more elegant and simple than some other mainstream languages, like e.g. C++, Java or C#, IMHO.