7 ms·
Why we hate Lisp
- sgt 16y agoI wonder in which (if not all) ways this applies to Clojure.
- ihodes 16y agoIt's interesting; lots of the complaints I got to are in fact addressed by Clojure. Syntax: code is still data, but there is additional syntax (like {} for maps, [] for vectors) that makes reading coding a bit easier; I don't particularly thing Lisps are hard to read anyway, but it is nice. Function names are less obscure; we have first and rest instead of car and cdr, for instance. I also hope we're a nice community to be around! I've certainly enjoyed my stay so far.
- KC8ZKF 16y agoFIRST and REST are from Common Lisp. http://www.lispworks.com/documentation/HyperSpec/Body/f_firstc.htm http://www.lispworks.com/documentation/HyperSpec/Body/f_firs... http://www.lispworks.com/documentation/HyperSpec/Body/f_rest.htm http://www.lispworks.com/documentation/HyperSpec/Body/f_rest...
- nickik 16y agoyes but in CL you have "rules" when to use first/rest and when to use car/cdr. A noob does not want to learn them.
- nickik 16y agocorrect would be to say clojure has first/next.
- sedachv 16y agoThere aren't any for loops! I GIVE UP
- nickik 16y agothere is for in clojure
- cgrand-net 16y agolike clojurebot says: "for is not a loop" doseq is.
- rbanffy 16y ago...then you'll see, that it is not the loop that loops. It's only your program
- beefman 16y agoClojure pretty much breaks all these old Lisp flame wars. Summing integers 1-10 is, incidentally, (sum (range 1 10)).
- stuhacking 16y agoThis is also possible in common lisp, however, there seems to be a lot more use of looping in CL than other dialects... Perhaps for performance reasons. Suppose, for example* , that `range' conses up a list of START to END numbers, then sums that list. That's a bunch of memory allocation then a reduction. It may be elegant, but looping over the numbers and accumulating the result would be faster and use less memory. I'm no expert, but it seems that a lot of production common lisp code will have gone through a few cycles of optimisation and arrived at a point of resembling imperative procedures. As a result common lisp teaches iteration (skipping over the need to rediscover the production tricks) while scheme teaches recursion. * That's not to say that this form couldn't be implemented in terms of looping.
- lukev 16y agoBut it's a vital point that 'range' doesn't allocate the whole list - it generates the head of a lazy seq. So the Clojure form CAN be compiled to be nearly as fast as the CL one. Why do optimization by hand when you can write something conceptually cleaner and let the compiler do it for you?
- sedachv 16y agoIf you look at CLtL appendices A and B, you'll see that Common Lisp was originally going to come with Rich Waters' SERIES (http://series.sourceforge.net/ http://series.sourceforge.net/), which is like lazy iterators/stream processing. At the time there were plans for doing all kinds of neat optimizations, including what's now known as map fusion in Haskell-land.
- agentultra 16y agoYeah, more hand-waving holy-war non-sense. Lisp is a great language. You could probably compress this page a fair bit. 80% of arguments against lisp are superficial 15% of arguments are unsubstantiated 5% of arguments are good and come from SmugLispWeenies who've actually used Lisp for many projects and get to know its warts pretty well.
- Avshalom 16y ago80% of arguments against lisp are superficial And? Death of a thousand paper cuts is still death.
- nkassis 16y agoHas this ever happened? I don't really want to know actually.
- rdtsc 16y agoBut when it happens it's a nasty death, and leaves a sour taste in the mouth of both those who are pro- and against- the said technology. Those that "die" are upset because they bought into the technology, invested time and energy into it, it didn't work out. BUT not because of one single reason, but because a whole lot of small ones. It's frustrating to explain to someone why it didn't work because there isn't one or two reasons -- it turns into a long list of small claims that sound silly individually and makes the one making them seem whinny and complaining for no reason... And this gets the supporters of the technology upset. They see others baselessly attacking their favorite tool. EDIT: A prime example of this was the GNU/Linux desktop. New users would try it, it kinda worked, except when it didn't. Major things were "ok" but many small things were not polished. And the Linux geeks just heard a lot of small complains and couldn't understand why everyone "hates" GNU/Linux for no apparent reason.
- agentultra 16y agoI wasn't invalidating the criticisms themselves actually. I was suggesting that there were a lot of repeat criticisms that we all know and hear all the time. 80% of the page are the same criticisms of syntax, keyword names, prefix notation, and structures. One could probably reduce the length of the page by a significant amount if they just replaced it all with a single <ul>. The criticisms of Lisp are nothing new. The language has been around for a dogs age. There are going to be people who will never like parens or silly keywords like cons, car, and cdr. Personally I find it equally silly when they claim such superficial reasons are why Lisp is a terrible language. Every language has to deal with some amount of this weak argument. Lisp is no different, so I have no qualms with the argument itself. If Lisp doesn't work for you, it doesn't work for you. It's no reason for "hate". :p
- whyenot 16y agoWhy we love lisp: http://c2.com/cgi/wiki?WhyWeLoveLisp http://c2.com/cgi/wiki?WhyWeLoveLisp
- dkarl 16y agoThis was not written by somebody who spent much time learning Lisp. This was written by somebody who gave up pretty quickly. Quick summary/translation: We want to be finished learning Lisp, and it makes us angry to encounter evidence to the contrary. Even though we can't yet code a simple loop, we know exactly the best way for you to help us, and it makes us mad if you try to steer us in a different direction. We're grown-ups now and don't ever want to be beginners at anything again.
- mahmud 16y agoc2 is where the LtU crowd goes to for relief, after a few drinks. (with apologies to my IRL friends, and avid wikiers :-)
- jwhite 16y agoThe SmugLispWeenies complaint always strikes me as a really poor excuse for disliking lisp. If a cantankerous old so-and-so gives you a hard time and you run away from the language because of it, I think it says more about you than the cantankerous old so-and-so, and nothing about the merits and disadvantages of lisp. Furthermore, there are lots of non-cantankerous old and not-so-old people using lisp, writing about it, and publishing code these days -- the web is full of good lisp resources. Google answers almost all my lisp problems for me. That means you don't even have to venture into the SmugLispWeenies cave most of the time. After that, there are quite a few good books out there. I'm reading Doug Hoyte's "Let Over Lambda" at the moment, which is lots of fun. My current problem with lisp is not the SmugLispWeenies but the fact that there don't seem to be any lisp jobs where I live :-)
- astrange 16y agoThere weren't many other communities when that page was written. If they were, they weren't well-known. At the very least, the only one I've heard of is on newsgroups, and most of what I hear about that is that if you asked a question some Norwegian guy would flame you so hard you would actually die. The best resource would be a practical tutorial as easy to follow as Learn You A Haskell, or at least a language subset as easy to learn as quickly as C - C being, of course, the best language ever invented. If people get stuck at the level where they're just capable of arguing about the loop macro, maybe you should get rid of the loop macro, or at least not let them know about it.
- sedachv 16y ago"At the very least, the only one I've heard of is on newsgroups, and most of what I hear about that is that if you asked a question some Norwegian guy would flame you so hard you would actually die." That's the most hilarious description of comp.lang.lisp ever. Yeah, it's pretty much like Mad Max when it comes to programming language communities. Now minus Erik Naggum and plus a lot of spam.
- jwhite 16y agoGood point about the age of the page. From what I've observed, things have changed a bit in the last ten years or so, no argument there. "Learn You A Haskell" is very good, and I haven't seen anything like it for Common Lisp. However, Peter Seibel's "Practical Common Lisp" is quite close in terms of target audience, and also very good. I won't argue with the assertion that Common Lisp is hard to learn. PCL, pg's "ANSI Common Lisp" and "On Lisp", and "Let Over Lambda" that I've mentioned are a good start, but it can be difficult to get from the text book knowledge to good, practical, useful programs. That said, I don't think that it's the fault of Common Lisp. C is easy to learn because it is small, but it is also C. (I'm programming C and Ruby in my day job, and I love C, but there are times when I wish it had more of the expressive and abstractive power of Ruby or Common Lisp.) Common Lisp is hard to learn, but once you've learned it you get to program in Common Lisp. Regarding LOOP: some people consider integral calculus difficult to learn. Does that mean we should excise it from mathematics, or at least not let high school students know about it? LOOP is part of the standard, so it's not going away any time soon.
- mnemonicsloth 16y agoBest sentence from the c2 Clojure Page: "Is probably a HomoiconicLanguage" http://c2.com/cgi/wiki?ClojureLanguage http://c2.com/cgi/wiki?ClojureLanguage
- sedachv 16y ago"For example, if a C programmer asked HowToSumFromOneToTenInLispOrScheme, he might start thinking along the lines of... for (int i = 1; i <= 10; i++) ..." The correct SmugLispWeenie reply is to say: "n(n+1)/2, now get out of here and don't bother coming back until you've learned some math and have come up with a real-world problem."
- adlep 16y agoLISP is way over my head. The entire recursion based theme of LISP does not click with me, and it is entirely my fault. I tried and I barely passed my LISP class. It was though. I remember having problems writing even the simplest code - like Fibonnaci in LISP... If you know how to code in LISP, you surely must be an android.
- gjm11 16y agoYou don't have to write recursion-heavy code in Lisp. You can if you want to, and it hurts less than doing the same in many other languages, but iteration in Lisp works just fine too. (The Common Lisp LOOP macro basically gives you a little embedded language just for expressing iteration. So does ITERATE, which some people prefer but isn't in the standard.)
- lelele 16y agoHowever, Common Lisp's LOOP really sucks. ITERATE fixes that: http://common-lisp.net/project/iterate/ http://common-lisp.net/project/iterate/
- arethuza 16y agoYMMV - I really liked loop
- lelele 16y agohttp://items.sjbach.com/211/comparing-loop-and-iterate http://items.sjbach.com/211/comparing-loop-and-iterate http://items.sjbach.com/280/extending-the-iterate-macro http://items.sjbach.com/280/extending-the-iterate-macro
- sedachv 16y agoI'm another person that likes loop more than iterate.
- lelele 16y agohttp://items.sjbach.com/211/comparing-loop-and-iterate http://items.sjbach.com/211/comparing-loop-and-iterate http://items.sjbach.com/280/extending-the-iterate-macro http://items.sjbach.com/280/extending-the-iterate-macro
- julius_geezer 16y agoI don't hate Lisp, I rather like when I encounter it. The only actual work use I've made of it was a command or two in Emacs Lisp years ago. On the other hand, I'm tepid toward JScript and dislike VBScript. But occasionally I have had to write something to run on Windows machines where I could not install a preferred language. So one of the two it had to be. I don't particularly like PHP--its support for closures and constructs such as map aren't pretty. But it's might easy to configure and run on any given Linux box. If the Lispers want to build and distribute mod_lisp RPMs, I'll be hapy to take a look.