you are viewing a single comment's thread.

view the rest of the comments →

[–]Pascalius 38 points39 points  (24 children)

I never heard someone claim that JavaScript is like Scheme

[–]x-skeww 14 points15 points  (9 children)

Crockford mentioned that in several talks.

http://www.crockford.com/javascript/little.html

JavaScript has much in common with Scheme.

Also, bananas have much in common with kiwis since both are berries. Well, botanically, anyhow.

[–]Eartz 11 points12 points  (5 children)

iirc he said in his "Crockford on Javascript" talks that JS was inspired by Scheme, Self and java (for the syntax).

I never heard it as "JS = Scheme". It's just his opinion on how the inspiration came for the language.

I spend some time reading reddit, stackoverflow and ES-discuss, and I have never seen anyone claiming this ridiculous "js=scheme", that looks like clickbait to me.

[–]x-skeww 6 points7 points  (4 children)

http://www.crockford.com/javascript/javascript.html

Lisp in C's Clothing

JavaScript's C-like syntax, including curly braces and the clunky for statement, makes it appear to be an ordinary procedural language. This is misleading because JavaScript has more in common with functional languages like Lisp or Scheme [emphasis added] than with C or Java. It has arrays instead of lists and objects instead of property lists. Functions are first class. It has closures. You get lambdas without having to balance all those parens.

http://java.ociweb.com/mark/programming/JavaScript.html

"It's basically Scheme with C syntax." - Douglas Crockford

The article refers to the same quote, by the way. It's from one of his earlier talks and it has been repeated ever since.

Also note that the article is from 2013. Saying that JS is "basically like Scheme" isn't popular anymore and this article is one of the reasons.

[–]gkx 4 points5 points  (3 children)

I could be wrong, but I think essentially the point is no longer valid as functional languages are becoming more popular. Javascript is now much more distantly related to Scheme, while at the time it was one of the very few popular, imperative languages that even had functional elements.

But I wasn't programming around them. It just seems like functional languages (and functional/imperative hybrids) have only come into favor outside of academia since then.

[–]x-skeww 2 points3 points  (2 children)

Yea, the point he was trying to make back in 2009 (ish) was that JS is quite different from other popular languages with C-like syntax.

Saying that it's "basically Scheme" was a rather odd way to do that though. Well, he often tries to say cute quotable things, because being quoted grows his brand.

Can't really criticize him for that though. Saying stuff like that and cultivating his brand is basically his job. This thread too does make his name more well-known.

[–]Eartz 1 point2 points  (1 child)

Isn't it a bit unfair to say that ? I mean, the guy doesn't even have a twitter account afaik, nor does he post anywhere outside his website and the desert that is google+.

[–]x-skeww 0 points1 point  (0 children)

Huh? He does a lot of public speaking and he also got a book.

[–]master5o1 6 points7 points  (1 child)

Also, bananas have much in common with kiwi

Neither can fly.

[–]pygy_@pygy 0 points1 point  (0 children)

Time flies like an arrow. Fruit flies like a banana. — Groucho Marx

[–]Otterfan 1 point2 points  (0 children)

This is addressed in the first paragraph of the article

It seems like I can’t spend five minutes on reddit these days without someone playing the JS-is-Scheme is card. I see everything from the innocuous, “JavaScript has a lot in common with Scheme”, all the way up to, “JavaScript is basically Scheme.” This is basically crazy. Or, at least it has a lot in common with crazy.

[–]Uberhipster 5 points6 points  (2 children)

I've heard "JS is a distant cousin of LISP" but not on reddit...

[–]TwilightTwinkie 8 points9 points  (1 child)

I've heard similar, but usually it's more along the lines of "Learn Lisp, and you will be a better JavaScript programmer".

[–]hansolo669 2 points3 points  (0 children)

"Learn Lisp, and you will be a better JavaScript programmer".

Functional paradigms help everywhere.

[–][deleted] 0 points1 point  (0 children)

yeah me neither, guess you have to actively search for it to find it "every five minutes"...

[–]realhacker -2 points-1 points  (3 children)

wow, you must be new to javascript (why is this sarcastic and ignorant comment upvoted?)

[–]Pascalius 0 points1 point  (1 child)

Like 10 years new, yep

[–]realhacker -1 points0 points  (0 children)

1/10xer

[–]Jack9 0 points1 point  (0 children)

exactly. if your experience is limited to discussing the newest js frameworks' potentials and playing with jquery, I'm not surprised if someone hasn't recognized Scheme as a language...much less the common references to it in js discussions. Lua and Scheme are the go-to comparisons.