7 ms·
> Why this great resistance to moving away from javascript? To what? What scenario do you envision where Apple, Google, Microsoft and Mozilla are all willing
by mccr8 14y ago
> Why this great resistance to moving away from javascript?
To what? What scenario do you envision where Apple, Google, Microsoft and Mozilla are all willing to implement a single new language for the web?
- duaneb 14y ago> To what? What scenario do you envision where Apple, Google, Microsoft and Mozilla are all willing to implement a single new language for the web? Well hopefully we wouldn't make the same mistake again by going with a language and we would just implement a VM on which JS is implemented. It would be much easier to validate the correctness of a VM anyway, achieve better speed than was possible before, and not tie people down to a (painful) language. On a personal note I would actually start to view the web browser as a platform instead of a bunch of tangled strings, cans, and tape. EDIT: I didn't answer your question. But, as a developer, I will only move to the web for my default programming language when I have bytecode or assembly to look at, not some convoluted scripting language. Hopefully, Asm.js is a minor, minor bump on the way towards the browser as a usable platform for arbitrary development.
- deleted 14y ago[deleted]
- TheZenPsycho 14y agoOh. Right. A VM. On the web. Because that worked reallllly well when Java did it.
- duaneb 14y agoYes, because all VMs are as bad as the JVM, which was never intended to be run through a browser.
- TheZenPsycho 14y agooh my, how old are you, little boy? http://en.wikipedia.org/wiki/Java_applet http://en.wikipedia.org/wiki/Java_applet "Java applets were introduced in the first version of the Java language in 1995" Remember, why Javascript is called Javascript. So it wouldn't be seen as competing with Java as "the language of the web". Java, and its VM was designed for the web. To run in a browser. It was given every conceivable chance, and it utterly failed because ultimately, it's fundamentally a terrible idea. But somehow fellows like you are too headcopped to see history for what it is, and you are doomed to repeat it. I remember when most developers would be surprised if you told them you could make programs in Java that are not applets. And java had a reputation for being "that really shitty slow painful web language"
- munificent 14y ago> It was given every conceivable chance Except that it didn't have decent DOM integration...
- TheZenPsycho 14y agoYes it did. The DOM was designed to be used from JAVA. which is why it seems so out of place and verbose in JavaScript.
- TheZenPsycho 14y agoto gives some context and history: September 18, 1995: Netscape 2.0 released with Java and Javascript support. This has the DOM level 0-. Java is marketed as the language for "Big boy apps" and javascript is merely the scripting "glue" that lets java access DOM level 0, which is limited really only to reading form data and changing the .src attribute on some images. [1] 1998: "The initial DOM standard, known as "DOM Level 1," was recommended by W3C in late 1998. About the same time, Internet Explorer 5.0 shipped with limited support for DOM Level 1. DOM Level 1 provided a complete model for an entire HTML or XML document, including means to change any portion of the document. Non-conformant browsers such as Internet Explorer 4.x and Netscape 4.x were still widely used as late as 2000." [2] August 2001: Internet Explorer 6 is released with still " and partial support of DOM level 1" [3] in the same month (August 2001) Netscape 6.1 is released [1] netscape 6 was the first Netscape browser based on the "Mozilla Application Suite", what Firefox is based on today. It's hard to find detailed information on this, but I would also guess that Netscape 6 had "Partial Support" for DOM Level 1 February 6, 2002 (6 months later): Java's J2SE 1.4 runtime is released, and has, again, Partial DOM level 1 support, along with the ability to directly manipulate the page that an applet is on without using Javascript as "glue" Which of course is the whole point of the DOM, as a "language agnostic" API that needed to be used from not just Javascript, but Java, C++, and VBScript and whatever other language. It was, to be fair, shitty, but we are talking, at this time, 2002, people are using IE6 and netscape 4 still. Browser support for DOM matured around 2006, and so did Java and its applets, keeping pace right along with the browsers. People generally don't really understand that Java and Javascript are two seperate languages. It's all just "Java, that really shitty slow web language" [1]:http://en.wikipedia.org/wiki/Netscape_(web_browser)#Release_history http://en.wikipedia.org/wiki/Netscape_(web_browser)#Release_... [2]:http://en.wikipedia.org/wiki/Document_Object_Model#Intermediate_DOM http://en.wikipedia.org/wiki/Document_Object_Model#Intermedi... [3]:http://en.wikipedia.org/wiki/Internet_Explorer_6 http://en.wikipedia.org/wiki/Internet_Explorer_6
- alayne 14y agoJavaScript is essentially a high level VM on the web. That's how Dart uses it.
- wwweston 14y agoDon't forget Flash, which did actually work relatively well, and pretty much powered the development of the web as a video and gaming platform... but which we've eventually ditched for HTML/CSS/JavaScript + native web APIs anyway.
- TheZenPsycho 14y agoThat is fair enough. Though that wasn't really Flash's original ambition. And to be further fair, the fact that it wasn't their explicit ambition is possibly what saved it, while Java suffered a doomy fate from Microsoft's embrace and extend strategy. Flash was fine as a format for vector images. (like SVG). Then it was fine for animations. Then simple interactive graphics. Then it gets a scripting language. And as it gets more and more sophisticated, more used as an application platform-- something flash was not originally designed to do, it becomes more and more like Java in its shortcomings. Binary blobs. Long load times. Serious security holes. Slow as molasses. But flash always had one good thing going for it: Anti-aliasing.
- munificent 14y ago> Well hopefully we wouldn't make the same mistake again by going with a language and we would just implement a VM on which JS is implemented. A VM still needs some kind of well-defined input format, and that's a language. Whether it's human-readable text or binary doesn't make that big of a difference. Either way, designing language semantics is hard.
- MatthewPhillips 14y ago> Whether it's human-readable text or binary doesn't make that big of a difference. To people like the grandparent, that is the only thing that matters at all. It's not a technical problem they have but an emotional one. They do not want the code they write to be a second class citizen to the code someone else writes, and they will absolutely be ecstatic to see us throw away the last 15 years of progress and start from stratch in order to alleviate that problem they have.
- skatepark 14y agoMeanwhile, you web guys are throwing away the last 30 years of progress on consumer application development, and starting from scratch. Web apps are not documents.
- MatthewPhillips 14y agoWeb apps serve a purpose that didn't exist 30 years ago.
- skatepark 14y agoNow I'm very curious what you think that purpose is.
- coldtea 14y agoIts like CS newbies, in the first year of Uni thinking that OSs should be written in assembly to be faster....
- ajasmin 14y agoNow Apple, Google, Microsoft and Mozilla will all have to ensure that tricks like (a+b)|0 are executed optimally though.
- nnethercote 14y agoYeah, but that's not hard. And there's a spec that makes it extremely clear which tricks are necessary -- no need to reverse-engineer someone else's implementation, and no risk of tricks that work today breaking tomorrow.
- cpeterso 14y agoThe beauty of this approach is that browser vendors don't have to execute these quirky expressions optimally. They are standard JS, so they will already work.