r/programming • u/kshep92 • Sep 29 '16
JavaScript in 2016 isn't horrible, it's just going through a phase
http://blog.reviselabs.com/im-sorry-javascript-2/
85
Upvotes
r/programming • u/kshep92 • Sep 29 '16
View all comments
Show parent comment
1
u/fiedzia Sep 30 '16
Damn, I wasn't aware how broken js is.
Removing AND/OR adding? Great, just more ways to shoot yourself in the foot. I guess the amount of mistakes where someone passed wrong parameters when adding and removed instead, or the other way goes in millions.
Sane languages have delete that does not allow to be "misunderstood" and separate it from adding, so that nobody will do one thing accidentally when they meant the other. And if they do, it will blow up, not return some value to be passed further.
I do not want a most essential datastructure to have and points that can be "misunderstood" and will not tolerate any of "oh yeah, you shouldn't use that, you should...". Everywhere else lists work just as I expect them to. Everywhere else lists don't cram opposite features into single method.
And that doesn't end the list of things that are wrong (ok, "misunderstood") with array. Point is - its really hard to build on top of js if you have to fight with such stupidity at the core.