5 ms·
That meme "Javascript is basically Scheme with a C based syntax" has been refuted so many times it's not even funny. Does it have a metacircular evaluator? Is i
by Derbasti 13y ago
That meme "Javascript is basically Scheme with a C based syntax" has been refuted so many times it's not even funny. Does it have a metacircular evaluator? Is it homoiconic? Does it have macros? Seriously, read SICP or some other Lisp book. You have no idea what you are talking about.
- TheZenPsycho 13y agoAnd yet you haven't cited even one refutation. Javascript has first class functions. It has closures. it has nice object/literal syntax. If you don't consider it cheating to use a library, it does have macros if you use sweet.js. It has a metacircular evaluator, from the very beginning called "narcissus", and if it had homoiconicity, it would be even more direly hated than it is now. Having syntax, for better or worse, is a strength that means that people actually use the language. For reals. Not just that one time at college. The real question is how are any of those features actually useful from anywhere but a theoretical purity standpoint? We're not exactly writing AI systems here. At the end of the day the language is there to write programs. And the sophistication of the programs you need to write in javascript doesn't really need those things most of the time.
- Derbasti 13y agoProbably one of the best written ones: http://journal.stuffwithstuff.com/2013/07/18/javascript-isnt-scheme/ http://journal.stuffwithstuff.com/2013/07/18/javascript-isnt... But basically, ask anyone with Lisp experience. Only JavaScript people without Lisp experience argue that JavaScript is Lispy.
- TheZenPsycho 13y agoThat's one. Not "so many it's not even funny". From the sound of it, you should have been able to rattle off 5 without hesitating. Maybe you meant "one. There's exactly one refutation" as for your second remark, uh... Douglas Crockford?
- Shamanmuni 13y agoDouglas Crockford just said that even though Javascript's syntax resembles an imperative language like C or Java, it's much more similar to a functional language like Lisp or Scheme. From that comment a whole myth began which states that Javascript == Scheme. That's like saying Java == C just because both are imperative. Handwavy and completely wrong. What you should take from that assertion is "Javascript is more functional than imperative" (which is correct) and not "Javascript is lispy" (which is not).
- draegtun 13y agoMark Jason Dominus also says the same thing about Perl in his Higher Order Perl book [1][2] and goes onto show that Perl has 6 of the 7 features that Norvig describes has making Lisp different [3]. [1] http://hop.perl.plover.com http://hop.perl.plover.com [2] Perl is much more like Lisp than it is like C (from Preface) [3] ... the book "Paradigms of Artificial Intelligence Programming", by Peter Norvig, includes a section titled "What Makes Lisp Different?" that describes seven features of Lisp. Perl shares six of these features; C shares none of them. These are big, important features, features like first-class functions, dynamic access to the symbol table, and automatic storage management. (also from Preface)
- aaronem 13y agoAs a Javascript guy with some Lisp experience, I wouldn't say Javascript is particularly Lispy, but I would absolutely say that Javascript is closer to being Lispy than pretty much any other language in which I've ever worked. Most of my recent web development work has been all frontend, with the server-side integration as lightweight and generic as possible and Javascript to do everything else, not so much because that's necessarily an ideal way to do it as because Javascript is so much more expressive, and less painful to work in, than any of the server-side options of which I'm permitted to avail myself -- PHP and Perl, basically, with a strong institutional preference for the former, because apparently being able to pick any of a hundred random idiots off the street and have them write code for you is a benefit? A low barrier to entry is not, in this context, a good thing. (Granted, the same can be said of Javascript, but there's a qualitative difference in that Javascript at least makes it possible to write good code.)
- nl 13y agoTake it up with Brendan Eich: Remember, I was recruited to "do Scheme", which felt like bait and switch in light of the Java deal brewing by the time I joined Netscape. My interest in languages such as Self informed a subversive agenda re: the dumbed down mission to make "Java's kid brother", to have objects without classes. Likewise with first-class functions, which were inspired by Scheme but quite different in JS, especially JS 1.0.[1] I presume you saw the word basically in my post? There's no doubt it is simplified, but that's a strength as well as a weakness. But anyway: A metascircle evaluator: https://github.com/mozilla/narcissus https://github.com/mozilla/narcissus It's not Homoiconic, and nor does it have macros - but a number of the languages the OP named as "good" languages lack both these features too. I stand by my point: Javascript is a perfectly good language. [1] https://news.ycombinator.com/item?id=2786720 https://news.ycombinator.com/item?id=2786720
- camus 13y agono it is not. half the people that are using it do so because it is shiped in browsers ,the other half are server side masochists that are not smart enough for Scala or Closure ...
- nl 13y agoSo that would be the language snobbery argument I mentioned previously? You make it sound like you think having to be smart to use a language is a good thing.