Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The languages that dominated the 2000s (Ruby, Python, Javscript, PHP) were all more or less derived from Smalltalk

One of these is not like the others. Javascript derives from Lisp (first-class functions, lambdas, closures), not Smalltalk.



Brendan Eich used both Scheme and Self as inspirations. Self is a dialect of Smalltalk.

https://en.wikipedia.org/wiki/Brendan_Eich


Did you link his biography? The claim is that he used Self as an inspiration, not that there was once a man named Brendan Eich.


More than features, JS derives from Lisp because its author was a Scheme implementor. Otherwise function pointers are trivially done even in assembly language, and Smalltalk does have closures.

Or maybe you think of the fact that JS uses prototype-based OOP, which makes it closer to what one would do with Scheme (something inspired from CLOS I guess) than Smalltalk ?


Prototype-based OOP came first in SELF, a Smalltalk dialect.

CLOS is an evolution from Flavors and similar Lisp packages, and outside Lisp, Julia would be the closest to it, in modern times, not counting Dylan.


> Prototype-based OOP came first in SELF

Isn't prototype-based OOP roughly a decade older? -> for example "Director" from Ken Kahn is from 1976.


Maybe, I never heard of "Director", its documentation seems hard to come by in digital world.

Although Wikipedia also points out that, https://en.wikipedia.org/wiki/Prototype-based_programming

Actually your remark has made me dive into alternative prototype based languages.


Check the resume of Ken Kahn: http://toontalk.com/resume.pdf

Director Guide: https://dspace.mit.edu/bitstream/handle/1721.1/6302/AIM-482b...

Creation of Computer Animation from Story Descriptions: https://dspace.mit.edu/bitstream/handle/1721.1/16012/0720063...

The other mentioned tool was Thinglab, by Alan Borning

https://www.ijcai.org/Proceedings/77-1/Papers/085.pdf

"The Smalltalk notion of an object has been modified and extended in a number of ways. In ThingLab, objects are constructed interactively by editing and making descendants of prototypes. An abstraction hierarchy is used that allows arbitrarily many levels of both parents and descendants, with the problem of objects with several parents being handled by the technique of merging. There is no distinction between classes and instances."

"The Programming Language Aspects of ThingLab, a Constraint-Oriented Simulation Laboratory" https://dl.acm.org/doi/pdf/10.1145/357146.357147

"CLASSES VERSUS PROTOTYPES IN OBJECT-ORIENTED LANGUAGES" https://dl.acm.org/doi/pdf/10.5555/324493.324538

Available in the Browser, running in Smalltalk: https://constraints.cs.washington.edu/thinglab/


Thanks for the overview.


Python has those too, although with less convenient syntax (multiline functions (closures) can only be at statement locations).


Sure, but use of those patterns is not idiomatic in Python.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: