4 ms·
Right, 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 199
by BrendanEich 12y ago
Right, 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 ;)