3 ms·
> all the inheritance was clearly an implementation convenience rather than any sort of philosophical inspiration. I don't believe that's true. Eich said: "I’
by munificent 4y ago
> all the inheritance was clearly an implementation convenience rather than any sort of philosophical inspiration.
I don't believe that's true. Eich said: "I’m not proud, but I’m happy that I chose Scheme-ish first-class functions and Self-ish (albeit singular) prototypes as the main ingredients." [1]
It doesn't look like philosophical inspiration because Eich was told to make the language's syntax resemble Java. But as I understand it, it was a very deliberate choice on Eich's part.
[1]: https://medium.com/@_benaston/lesson-1a-the-history-of-javascript-8c1ce3bffb17 https://medium.com/@_benaston/lesson-1a-the-history-of-javas...
- crabmusket 4y agoI can't find your quoted text on that page, but here is the primary source: https://brendaneich.com/2008/04/popularity/ https://brendaneich.com/2008/04/popularity/
- munificent 4y agoOops, sorry, I copy-pasted the wrong link. Thanks for the correction.
- masklinn 4y ago> It doesn't look like philosophical inspiration because Eich was told to make the language's syntax resemble Java. It’s not just that, it’s also the inaccessibility (`__proto__` has only ever been an implementation detail), and the inability to copy what Self actually called prototypes (had to wait until Object.assign before that was a built-in feature). Eich did not just provide a Java paint in the form of ctors, none of the prototypal features were easily and portably accessible until ES6. And since that also added class sugar, that’s what most everyone went with and the saviour of prototypal javascript was also its killer. Not to mention Self built much of the langage features upon delegative inheritance, something JS very much didn’t do e.g. scoping in Self is handled through parent slots.
- BrendanEich 4y agoScope in early JS was handled through a parent slot. Self was a big influence but I had no time to honor it properly. JS had ten days till a demo to prove to factions in Netscape and to most of Sun (Bill Joy was ally) that it had a role to play. See https://www.youtube.com/watch?v=krB0enBeSiE&t=2176s https://www.youtube.com/watch?v=krB0enBeSiE&t=2176s (earlier if you have time).