3 ms·
JavaScript Is Not Expressive
- smt88 10y agoTypeScript with tslint solved the specific problems mentioned here. That said, experienced devs know JS sucks, but we use it because it's popular. We need a better language that rivals JS in popularity.
- urvader 10y agoPlease look at the extensions of JS in ES6 for better solutions of the problems you talk about in the article. Symbols for example export const ADD_TODO = 'ADD_TODO' Can be written as export const ADD_TODO = Symbol() Also: The class statement that helps express the intention of a function. The power of JS is that you can choose your own style and evolve the code between paradigms when you need to. Most other languages forces you to one paradigm.
- smt88 10y agoC++, C#, PHP, Python, Ruby, and probably many other languages also support multiple paradigms. Few modern languages are deeply coupled with a paradigm, and the ones that are aren't popular. I personally strongly prefer languages that force a paradigm and therefore decrease creativity and variation between coding styles.
- amk_ 10y agoGreat point! I'd heard of symbols being added to Javascript but never made the connection to the widely-used :symbol syntax for naming constants in Ruby. (I didn't write the article, just posted it)