3 ms·
And 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
by TheZenPsycho 13y ago
And 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.)