6 ms·
WHAT? They skipped all the way from Lisp to JS? Why?
by strictfp 5y ago
WHAT? They skipped all the way from Lisp to JS? Why?
- deleted 5y ago[deleted]
- shaunxcode 5y agoJS has always been a LISP in Algol clothing.
- kazinator 5y agoOnly, you know, without List Processing. And seventeen things that test false. And all numbers being floating-point (except when optimized implementations fudgily pretend that small values are integers). And a switch statement that you have to put into a function in order to get a return value out of it (everything returns a value in Lisp). Maybe it's more of a Scheme in Algol clothing; not everything returns a value in Scheme.
- bmitc 5y agoAnd no tail-call recursion.
- bakul 5y agoActually Scheme is Algol in LISP clothing. I don’t know what that makes JavaScript.
- hajile 5y agoThere were some similarities, but I'd say Scheme is more different than similar. Scheme is GC'd Scheme is fundamentally based on functions rather than proceedures Scheme functions are first-class Scheme uses tail recursion in place of loops Scheme uses CPS and continuations (even though that was no doubt a mistake) Scheme has symbols and programs are composed of symbols. Scheme makes use of macros pervasively (not even C-style preprocessors were in ALGOL) Scheme has only expressions while ALGOL has statements. A lot of surface-level API designs and names seem inspired by ALGOL, but the fundamental building blocks seem very different to me.
- bakul 5y agoScheme adapted lexical scoping and block structure from Algol 60. Lexical scoping was a major departure from LISP in 1970s. Call/CC was not in the original Scheme. Probably added in R4RS. Macros came later too. My point was that calling JS Scheme in Algol clothing even less valid than calling Scheme Algol in LISP clothing!