4 ms·
JavaScript is popular because browser vendors have not yet agreed on anything better. Remember Native Client? You might as well forget it -- Mozilla didn't si
by arh68 12y ago
JavaScript is popular because browser vendors have not yet agreed on anything better. Remember Native Client? You might as well forget it -- Mozilla didn't sign on. ActiveX is a joke, but if Mozilla & Google et al had moved more confidently towards something Native Client-ish, we could be writing web apps in Go/Rust instead of JS. (or Groovy, $lang_of_choice) But what's their incentive to make that effort?
Ajax was great when IE rolled it out all by themselves. It first might seem like a skunkworks like ActiveX if you didn't know better. Give it a few years' time, coordination and cooperation, and now we've got a Websockets RFC. Consensus takes time.
As crusty as JS may be, I don't think these are dark times at all. I think the rate of evolution (in JS engines, ES6/7, ..) is so swift it's more worthwhile to stick to the JS platform than to reinvent the web yourself.
- vorg 12y ago> we could be writing web apps in Go/Rust instead of JS. (or Groovy, $lang_of_choice) Couldn't work out if you're using Groovy as an example of a shoddy language used because there was nothing better (like JS), or a better language that everyone couldn't agree on (like Go/Rust). Groovy was originally based on Beanshell but with closures added, and became mildly popular for scripting on the JVM around 2006 onwards, and its later use by Gradle for 30-line build scripts. A meta-object protocol was added and Grails (a knock-off of Rails) was built to utilize it, though Grails use is on the decline partly thanks to Node.js. Although the backers of Groovy have since added other cruft, it hasn't moved beyond its original use case of scripting the JVM (like Bash for Linux).
- DonHopkins 12y agoWhat's ironic is that Mozilla is deeply infused with its own version of ActiveX called "XP/COM" that's practically the same thing (to a point), just using a totally different set of (open source) tools. You can use and implement COM or XP/COM components in C, C++, JavaScript and (theoretically but not commonly for XP/COM) other languages. XP/COM is not syntactically compatible with COM, and uses a completely different headers, tools, etc, but they're identical in memory layout and behavior and design. Of course beyond identical IUnknowns, XP/COM's interfaces, metadata, and JavaScript interoperability are totally different than ActiveX on IE. They eventually realized they'd gone too far with it, and went through a "de-COMification" phase around 2002, and it's been a few years since I worked on a xulrunner application, but as far as I know, XP/COM is still pervasive throughout Mozilla/Firefox/xulrunner, including its deep internals and its chrome user interface layer. COM was a good solution for a particular set of problems at the time, which Mozilla also needed to solve, so XP/COM made sense in that context. But these days, it makes more sense to use JavaScript and JSON directly as the interoperability layer between components and other languages, instead of COM. JavaScript won the language war, so it gets the privilege of being the "linguistic motherboard" that you can plug other languages, emulators and components into.