5 ms·
Hopefully some of the cooler Lisp dialects like Clojure & Nu will help out a bit. The "crazy parentheses" is usually the core reason people hate lisp, but unti
by catch23 18y ago
Hopefully some of the cooler Lisp dialects like Clojure & Nu will help out a bit. The "crazy parentheses" is usually the core reason people hate lisp, but until they realize its power, it's stupid stuff that prevents them from learning it.
For example, Nu is one of the coolest languages out there that allows one to do quick and dirty "scripting language" hacks in Objective-C. Due to Lisp's simple structure, Nu was able to directly map Objective-C method call signatures into something that clearly looks like basic Lisp. It allows one to code in 2 languages, but the Objective-C part of the language actually looks very similar to normal ObjC. One of the biggest benefits of Nu is that writing unit tests in ObjC is no longer painful... the whole testing structure is as simple as typical ruby unit test cases.
Clojure is another one of those wonderful libraries that is a must-have for anyone doing normal java. Even basic string manipulation is extremely verbose and annoying in Java, but is probably too heavy to load a JRuby/Jython interpreter... I think that's where clojure helps fill the gap. I recently implemented an "equivalent" of a google-analytics tracker in Clojure and the final result was only around 200 lines of code (with a little bit of java here and there). It's quite nice to use clojure as a glue-language to make all your java libraries work together with little clutter as possible.
- SwellJoe 18y agoThe "crazy parentheses" is usually the core reason people hate lisp I very strongly suspect that the "crazy parentheses" is not actually why most people who hate Lisp hate Lisp. Crazy parentheses are nowhere near the top of my list of reasons, anyway. And, blaming parentheses is the same as complaining about the sigils in Perl or the significant white space in Python; it's just not a very intelligent argument, and can probably safely be dismissed as merely uninformed. Sure, you like what you're accustomed to, but you can become accustomed to different syntax quite easily...one or two weeks is all it took for me to switch from Perl to Python, and then back again a few years later. A syntactic difference is just a very simple concept to latch on to; both for those who hate Lisp (for whatever reason) and those who want to explain away the people who hate Lisp (without having to address the real, but complicated, problems). There are a lot of very good reasons to hate Lisp, but they take more than one or two sentences to explain, and most folks just aren't going to invest that much effort in talking about something they just don't have that much interest in. The linked article does mention a few of the very good reasons to hate lisp, and leaves out a couple that I think are possibly even more important: - Lisp has a community that is generally hostile to newbies and outsiders (mentioning other languages, in particular, seems to be a big source of trouble). Contrast this with just about any other modern dynamic language community. Friendliness is practically religion in the Perl, Python, and Ruby communities (though I think only Perl has a formal religious institution for the purpose at perlmonks.org ). - A community that has a deeply ingrained culture of NIH. There are dozens of incompatible Lisps, with dozens of incompatible libraries for all sorts of tasks. I've found Lisp to be the most difficult language with which to produce useful software as a beginner of any dynamic language I've tried. Not because Lisp is inferior to Perl, Python, Ruby, etc. but because I found it impossible to find any combination of components that made it possible for me to produce useful software without running into bugs or incompatibilities that my weak knowledge couldn't overcome. Even if Lisp allows for code that's half or a quarter the size of any other dynamic language (which seems an unlikely compression), the sheer volume of excellent libraries in Perl/Python/Ruby means I can write a tenth the code, making those languages a win even if the total line count, including libraries, is higher. I've been told (grouchily, in keeping with the smug Lisp weenie tradition) that tons of great libraries exist for Lisp. Despite this assertion, I've never been able to build even a toy (but useful) project in Lisp.
- davidw 18y agoA few additions: * The parenthesis do require that you have at least a moderately capable editor to navigate them effectively. You can start coding things like PHP, Perl, Ruby, Python, etc... with a pretty crappy editor and do ok. * NIH - bingo! Lisp has always struck me as being very insular, with a very strong 'turtles all the way down' mentality. "It would really be best if the OS were written in Lisp too...", whereas the "scripting" languages are very promiscuous in terms of what they will interact with and run on. This has led them to focus on doing what they are good at, and calling out to C or other languages for what they are not so good at, which is ultimately more productive than rewriting existing systems just so that they'll be 100% in your language of choice. (Yes, sure, not everyone in the Lisp world is like that, but I get that general feeling).
- chandler 18y ago>> The parenthesis do require that you have at least a moderately capable editor to navigate them effectively. I disagree, with a caveat--writing code using a terrible editor requires knowledge of the indentation rules for the language, regardless of whether that language is a lisp, Perl, Ruby, etc. However (the caveat), although the indentation rules for Perl, C, Python are relatively simple (indent after a '{' or ':', line up arguments), each function/macro in a lisp can have different indenting rules (e.g. in CL compare `let' to `multiple-value-bind' to functions, to lists, to the various `with-*' macros, etc). Once you know the library for a specific implementation, the indentation rules become more obvious; at this point, using (e.g.) Notepad isn't particularly terrible (until that knowledge is acquired, though, yikes).
- davidw 18y agoNotepad is exactly what I'm talking about. With Perl, C, and Ruby, at least, there really aren't any indentation rules - your program will work fine even if you don't put any in at all, or do a hacky job of it. With Lisp, especially when modifying someone else's code you're stuck counting parens. Oh, also a weird (maybe crackpot?:-) theory of mine: parenthesis, graphically, don't form a nice, rigid vertical line, but sort of point diagonally, possibly making it just that much harder to see how they line up. In any case, 4 or 8 space indented C/Tcl/Ruby/whatever code is certainly more obvious to the eye.