Hacker News new | ask | show | jobs
by GeZe 4535 days ago
Self was one of the inspirations behind JavaScript, particularly its prototype system.

http://en.wikipedia.org/wiki/Self_(programming_language)

3 comments

I spent some time with Self in the late 90s (at college of course!) and it was impressive on several counts: first, it's JIT compiler allowed Smalltalk to run faster when implemented in Self than without - the same JIT technique was later re-used in Java Hotspots [1]; second, the programming environment was a multi-user environment called Kansas that allowed a whole classroom of students to develop "prototypes" in the same environment (Kansas [2] [3])

[1] http://www.princeton.edu/~achaney/tmve/wiki100k/docs/Self_(p...

[2] http://web.media.mit.edu/~lieber/Lieberary/Softviz/CACM-Debu...

[3] http://bluishcoder.co.nz/2013/09/16/multiple-users-in-a-self...

Except for the part where what Self calls prototype has no equivalent in javascript (constructors are close to Self's `copy` message, but not quite the same) and what javascript calls prototype Self calls mixin (or traits, depending whether they've got ancestors up to the lobby themselves). And a Self object can have multiple mixins and add or remove them at runtime.
The "JavaScript is like Self" fallacy is just another variant of the "JavaScript is like Scheme" fallacy. It sounds great to the person claiming it, and to an unsuspecting audience. But on closer inspection, the similarities between the two languages are minimal at best.
Newtonscript was also a descendent. Although I like Objective-C, I do miss Newtonscript and the soup. Prototype-based programming often had a nicer feel than [edit]class[/edit] systems.

http://newtonscript.org - look at the "SELF and the Origins of NewtonScript" down the page