4 ms·
That's explains how LiveScript became Javascript but it doesn't answer the more interesting question: how did Netscape end up using a Sun trademark?
by sambeau 12y ago
That's explains how LiveScript became Javascript but it doesn't answer the more interesting question: how did Netscape end up using a Sun trademark?
- pluma 12y agoAs I understand it from Crockford's retelling and what I've read on the web and heard in podcasts, Sun was concerned that LiveScript could be seen as a competitor to Java if both were present in the browser. Netscape wanted Java but wasn't willing to kill off their scripting language, so they agreed to name it JavaScript to make it sound like the two are related (and JS being "merely" a scripting language, people would still prefer Java for "real" programs). Apparently LiveScript was also originally planned to be more Lisp-like but then they went with C-like syntax because that was more popular at the time (see Java). And the entire language was cobbled together in a ridiculously short time frame (something like a couple of weeks?) and intended to be "beginner friendly", which is where a lot of the language's quirks come from. Considering the original JS already contained the syntax Crockford would eventually define as JSON, you could say they managed to create not one but two languages at once. Say what you will about JS being a good language or not, but you have to respect that achievement. Considering JS only became ECMAScript because Netscape was scared of incompatible copycats, you could argue JS as it is today wouldn't exist without Microsoft, too. Strange world, eh?
- Stratoscope 12y ago> Considering the original JS already contained the syntax Crockford would eventually define as JSON, you could say they managed to create not one but two languages at once. No, the original version of JavaScript did not include object literals and array literals - the two foundations of JSON. Object and array literals were introduced in JavaScript 1.2: https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/1.2 https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_... This is why old-school JavaScript programming had so much code like this: var obj = new Object; obj.prop = 'value'; and: var ary = new Array; ary[0] = 'first'; ary[1] = 'second';
- BrendanEich 12y agoRight, and note to grand-parent post: Crockford was not at Netscape so he's not the eyewitness you're looking for. I created JS1.2 and SpiderMonkey in fall 1996, as described in that JS Jabber podcast. Find this part in the transcript: "I started to rewrite the VM, pay off technical debt, and I wrote what became SpiderMonkey. The original Mocha VM was not SpiderMonkey." Object and array initialiser syntax was inspired by Python of the time (1996 would be Python 1.x, x around 6 IINM), but I made property names literals when spelled without quotes, as identifiers (same as the implicitly quoted name on the right of dot in member expressions). In ES6 (in imitation of computed property access using square brackets) you can finally compute property names in object initialisers too: var obj = { [nameExpr]: valueExpr };
- Telematica 12y agoAmazing. There is a bunch of stuff to ask for about JS API...
- pluma 12y agoOkay, so you didn't create the syntax JSON was based on until JS1.2? What I was getting at remains true then, though: you created JS and you created the object and array literal syntax that Crockford then "discovered" (to quote Crockford) and defined as JSON. Even if you didn't do it in the same couple of days it took you to create the original JS itself ;)
- bsimpson 12y agoThe eventual compromise was that JavaScript would be a playground for experimentation and learning; whereas, Java was designed for hardcore computer science-types. If you wanted to add rich functionality to your site, you'd use JavaScript to call into a Java library, which did the heavy lifting. (This was paraphrased from Brendan Eich's The Origin of JavaScript: http://javascriptjabber.com/124-jsj-the-origin-of-javascript-with-brendan-eich/ http://javascriptjabber.com/124-jsj-the-origin-of-javascript...) Of course, the web community embraced Shockwave/Flash over Java, and Java retreated to the server and mobile. Later, Steve Jobs was famously unimpressed with Macromedia/Adobe's forays into mobile and refused to ship a Flash interpretter in iOS. This led to the decline of Flash and a rising interest in creating a rich stack for client-side applications in JavaScript, bringing us to today's stack (canvas, WebGL, web audio, WebRTC, Ember/Angular/React, web components, pnacl/asm, etc.).
- cygx 12y agoI don't really understand what remains unclear. The cited section explains that when Java got put into the browser, executives of both companies got together and decided that it would be good PR to rename LiveScript into JavaScript. As Java was a trademark by Sun, they obviously had to register JavaSript as well (if they hadn't already done so - I did not look up the timeline, but it's not really relevant to the argument). Getting a license from Sun made it possible for Netscape to use the name without the Java trademark becoming diluted. Remember, if you don't defend your trademark, you'll lose it.
- ralmidani 12y agoBut Sun and Oracle have not demanded other users of Javascript obtain licenses.
- pluma 12y agoTrue, but for a long time the only noteworthy "other user" was Microsoft and they kept calling it JScript for years even after they adopted the standard. I'm not sure what exactly happened, but at some time after or during the lifetime of IE9 they stopped referring to their dialect of ECMAScript as "JScript" and began calling it "JavaScript". The most recent stuff I can find about JScript is about JScript.NET, which seems to be discontinued. There's this issue filed on the Mozilla project back in 2000 that addresses this problem: https://bugzilla.mozilla.org/show_bug.cgi?id=44841 https://bugzilla.mozilla.org/show_bug.cgi?id=44841 As Google, Apple and Microsoft are openly using the JavaScript trademark (without marking it as a trademark) these days, I'm going to go out on a limb here and guess that it's okay to use the term "JavaScript" to refer to an ECMAScript implementation that is compatible with the original JavaScript language developed by Netscape. This would probably preclude Adobe's ActionScript and other "enhanced" flavours of ES (e.g. JSX? I've never seen Facebook refer to JSX as "JavaScript <something>" in a way that would imply JSX is simply JavaScript).