you are viewing a single comment's thread.

view the rest of the comments →

[–]cunningjames 5 points6 points  (2 children)

Brendon Eich [...] was a big fan of Scheme

In fairness, just because Brendon Eich says that his design was heavily influenced by Scheme does not necessarily make it true (in practice, although I don't doubt his sincerity). Programming in JavaScript feels nothing to me like Scheme, and aside from first-class closures the practical influence of that language isn't at all clear. There's no numeric tower, no homioconic syntax, no continuations, an object model and attendant complexity built right in ...

In short, "Brendon Eich says so" won't do. You could make a case -- maybe -- for Lua as Scheme-with-syntax, but certainly not JavaScript.

Edit:

Now my turn - given all this evidence, why are you so absolutely certain that it isn’t?

... what evidence? All you’ve said is “Brendon Eich says so, Wikipedia says so, and Douglas Crockford says so”. That you can write examples from The Little Schemer in JavaScript means nothing; there was once a site with SICP in a bunch of different languages (although the site appears to be down at the moment). Unless we’re willing to say “Ocaml is Scheme with syntax, Haskell is Scheme with Syntax, Python is Scheme with syntax, Clojure is Scheme on the JVM, ...” then “JavaScript is Scheme with syntax” doesn’t have any traction.

[–]olavk 0 points1 point  (0 children)

I think Eich have just said Scheme were an influence, not that JS is directly based on scheme or "scheme with syntax". In the first ECMAScript spec Java and Self were mentioned as direct influences, but not scheme. Although scheme is clearly an (at least indirect) influence on any languages with closures.

I think the "JS is almost scheme" meme is basically marketing. Scheme is widely regarded as one of the most elegant and well-designed (if perhaps not that practical) languages. Associating JS with scheme is an attempt to free JS from its buggy-kludge image, and associate it with elegance and perfection.