> In what other language are people still having holy wars over how to separate statements?
Probably most of the languages in popular use. It's just that the fight is usually directed towards another language.
JS happens to be one of the minority where the standard allows some flexibility and debate about usage.
> mysterious constructs like prototype, new, and apply
They're well-defined, so they're not particularly mysterious if you take the time.
> Are we seriously incapable of doing better?
Really depends on how much effort you're willing to invest in learning JavaScript, instead of trying to write the code you're used to from $OTHER_OO_LANGUAGE. Everyone unwilling to do that is probably never going to be capable of doing better.
This isn't to say there's anything wrong with finding another familiar set of abstractions friendly or personally productive, but personally, I find greenfield JS is pretty fun, flexible, and capable.
Then again, I think the same thing about Perl (which everyone knows is one of the worst languages ever), so YMMV.
Maybe mysterious wasn't the best choice of word, but my point is that it's quite possible for something to be well-defined and yet poorly usable.
I long since gave up on trying to write the code I'm used to in other OO languages in JS. When I'm in JS Land, I put a lot of effort into using best practices. I just find it frustrating that so many of those best practices do not at all seem to adhere to any sort of principle of least surprise. And I wouldn't say that my problem is being too tightly bound to a particular OO paradigm; I've had great fun programming in functional styles and Prolog.
Probably most of the languages in popular use. It's just that the fight is usually directed towards another language.
JS happens to be one of the minority where the standard allows some flexibility and debate about usage.
> mysterious constructs like prototype, new, and apply
They're well-defined, so they're not particularly mysterious if you take the time.
> Are we seriously incapable of doing better?
Really depends on how much effort you're willing to invest in learning JavaScript, instead of trying to write the code you're used to from $OTHER_OO_LANGUAGE. Everyone unwilling to do that is probably never going to be capable of doing better.
This isn't to say there's anything wrong with finding another familiar set of abstractions friendly or personally productive, but personally, I find greenfield JS is pretty fun, flexible, and capable.
Then again, I think the same thing about Perl (which everyone knows is one of the worst languages ever), so YMMV.