News for hackers. Stuff that matters.
Re:My gripes with JavaScript by jerf on Wednesday June 22, 2011 @11:05AM (#2683423)
The other problem I would see is obvious if you continue with something like the following logic: All successful languages passed through a phase in which they had a broadly similar list of problems. How did they escape from that phase? Because somebody had the power to move the language forward. Somebody (or small set of somebodies) could say "yes" to that idea and "no" to the other idea, and implement them, and have them out for use in a matter of months, gather feedback on the results, and after ten years of repeating that, create a credible platform.

Javascript's root problem is that there is nobody who plays that role. The language has now been around for ~15 years, but it has hardly changed in the meantime. Not zero, I know that, but compared to the advances that any other language made over the same period of its life, Javascript has hardly moved at all. Not since Netscape lost the ability to unilaterally move the language forward by virtue of having the de facto only implementation has the language been able to move much.

So not only does the language have problems, right now, there is no effective path for those problems to be fixed in any reasonable period of time. We know this, because js.next shouldn't be "something we hope to see in a few years" but rather something that should have been done ~2002/2003, if the whole improvement process wasn't so broken.

(BTW, remember to separate "the language" from "the bindings". XMLHTTPRequest was not a Javascript change, for instance, just a new binding that all browsers had.)

Even the standardization process is slow, somewhat disconnected from implementation, and is still essentially focused on fixing syntax problems that have been dangling for a decade now. If js.next somehow successfully manifests in the next few years, we still have a lot of problems in the library department, for instance.

Server-side JS will probably face a decision point at some point in the not-very-near future, where the decision will have to be made as to whether it sticks as close to client-side, browser JS controlled by a effectively-leaderless process running at vanishing fractions of the rate of improvement of any other language, or if it runs off to start creating its own improvements, probably by paving over the cowpaths. I actually favor the latter, because it would create some set of people who can say yea or nay, restore an actual feedback loop, and create progress which could then be propagated back to clients as appropriate.

Re:My gripes with JavaScript by maratd on Wednesday June 22, 2011 @11:48AM (#2683655)
The fact that everything you said is true makes JavaScript an even more amazing language. How many languages could survive 15 years without change and still remain relevant? And not only relevant, but expand their influence?

Certainly this is mostly due to its unique position on the browser, but the language had to be flexible enough to fill that role and more. That's amazing.

Re:My gripes with JavaScript by Someone on Wednesday June 22, 2011 @12:08PM (#2683764)
IMO, it accomplishes this not as much by being good, as by being a parasite that infects web browsers. At that, it is so good that some people think the DOM and JavaScript are in a symbiotic relationship.

Yes, that is tongue-in-cheek, but without JavaScript, web browsers would have found another language; without web browsers, JavaScript would long have been forgotten.

Re:My gripes with JavaScript by maratd on Wednesday June 22, 2011 @12:58PM (#2683991)
> IMO, it accomplishes this not as much by being good, as by being a parasite that infects web browsers.

My memory is a bit foggy, but I recall Microsoft throwing a bunch of things at the browser in the beginning. You can specify the language in the script tag. VBScript anyone?

It wasn't like JavaScript didn't have competition ... it just won a very long time ago.

Re:My gripes with JavaScript by Someone on Wednesday June 22, 2011 @01:43PM (#2684213)
In my memory, JavaScript won because it had market penetration, it did not get market penetration because it won.

It had market penetration because it was included with Netscape Navigator.

Yes, it also was good enough at that time, but almost anything would have been, in a time where a ten-line script was huge. I do not think that it would have won against say VBScript if the latter would have been available on the same set of browsers.

Re:My gripes with JavaScript by chc on Wednesday June 22, 2011 @03:46PM (#2684810)
Microsoft threw one other language into Internet Explorer, and as far as I can recall didn't push it any harder than JavaScript. No other scripting language was ever implemented in any other browser. To call VBScript a competitor is being overly generous. JavaScript was really the only option for DHTML.
Re:My gripes with JavaScript by jerf on Wednesday June 22, 2011 @11:57AM (#2683701)
I agree, except that "without change" is a bit strong. Still, the basic structure is all there from the beginning, and while warty it has managed to support some non-trivial apps. I'd count it a win overall for the author, in a very tough field.
Re:My gripes with JavaScript by munificent on Wednesday June 22, 2011 @04:24PM (#2685064)
> How many languages could survive 15 years without change and still remain relevant? And not only relevant, but expand their influence?

I can think of one other, and for the same reason: make. Both languages are still around because it's near impossible to replace them, no matter how much they may suck. They aren't timeless, they're calcified by being a part of some infrastructure that exists on millions of machines.

Re:My gripes with JavaScript by mattmanser on Wednesday June 22, 2011 @03:22PM (#2684686)
Huh? It's the only language that works on browsers. That's how it got 'amazing'.
Re:My gripes with JavaScript by fholm on Wednesday June 22, 2011 @11:12AM (#2683449)
Very well put, pretty much agree with it completely.