|
|
|
|
|
by leetharris
1104 days ago
|
|
What exactly is "broken" about the foundation of JS? I hear this all the time and people can never back it up. It is extremely performant for a scripting language, it is easy to debug, and it works in many scenarios. People try too hard to be contrarian. Same thing happened with PHP and many other languages. |
|
More specifically, a few things that I think are pretty bad off the top of my head:
- Implicit type coercion
- Confusing scope binding, i.e., `this`, `bind`, etc.
- Inconsistent Array API — some methods return a new value; some methods mutate the value![0]
- `['1', '7', '11'].map(parseInt)` …lol?!
Maybe you shouldn't be so quick to jump to this conclusion that any criticism of your pet technology comes from a place of ignorance or pretension.
[0]: I've actually spoken with Brendan Eich about this one, and he conceded it wasn't a good idea. IIRC, he was just copying what Perl did.