4 ms·
THe only thing that really distinguishes lisp these days (IMHO) is its macros. However, I think there are better languages out there to learn any particular par
by duaneb 14y ago
THe only thing that really distinguishes lisp these days (IMHO) is its macros. However, I think there are better languages out there to learn any particular paradigm-Python/Java for OO, Haskell/Erlang for functional, C for procedural, Ruby/Python for dynamic & duck typing, etc.
Lisp is great if you need a compiler tomorrow. If you have the time, though, I think that other languages are better when there's more time to invest.
EDIT: To actually answer the question, of course it's still relevant and useful, but perhaps other languages have caught up. It's still used in industry (Google uses it via ITA, IIRC).
- bcoates 14y agoMulti-methods are still scarce among languages with OO features, and it's a big hassle working around that shortcoming. There's probably more gems in CLOS that haven't made it out into the mainstream yet.
- BruceM 14y agoMultimethods and the condition system are 2 of my favorite things.
- yakiv 14y agoGenuine question here: when are multimethods useful in practice?
- bcoates 14y agoOne of the less controversial uses of OO dispatch is to replace switch statements or chained ifs with a polymorphic function. Try to do this more than a few times to the same codebase, and you'll either wind up having to merge classes into weird hierarchies or use hacks like "the visitor pattern" to proceed. The other big use of multimethods is when you have static-type function overloading (as in Java/C++) and decide you need to move the overload selection into runtime via the dynamic type of the arguments. This isn't possible in the general case without doing all the dispatch work yourself, but it's a trivial with multimethods.
- monkeyfacebag 14y agoIt's not clear to me what Python the language offers over the Lisp family, other than improved readability for some class of users and translation to and from pseudocode (see Peter Norvig's comment in 2010: http://news.ycombinator.com/item?id=1803351 http://news.ycombinator.com/item?id=1803351 ). These aren't necessarily small advantages, but neither do they mitigate Lisp's power and flexibility. I do, however, think Python the community offers a lot of practical advantages to the new user over, say, any particular Lisp community.
- TylerE 14y agoA high quality reference implementation. This is, in fact, a trait shared with pretty much every other language to gain traction in the last 20 years. In Lisp, there is substantial fragmentation on how do things like GUI and Networking, and often no clear winner. SBCL seems to be the de-facto FOSS implantation, but Allegro is the leading commercial vendor.
- betterunix 14y ago"In Lisp, there is substantial fragmentation on how do things like GUI and Networking, and often no clear winner" Is there a clear winner for GUI in Python? GTK, Qt, etc. Python also has quite a few networking libraries; networking in today's world is more than mere sockets. "SBCL seems to be the de-facto FOSS implantation" Meh, GNU Clisp is pretty relevant, and a lot of people are using Clozure. CMUCL also remains relevant, if only because of its useful extensions (SBCL is a fork, and dropped many extensions like Motif support). I think what CL really needs is an update, a CLtL3 that adds support for modern features. Modern Lisps like Clojure and Racket do not have many of the constructs that make CL great (which is not to say that Clojure or Racket are not great languages, but they are missing some of the nicer CL features).
- TylerE 14y agoThere are alternative's in the Python world, but they are not mutually exclusive. Where-as in the lisp world stuff like the socket interface is DIFFERENT depending on the implementation. So you don't get to pick and choose.
- pavelludiq 14y agoCLOS and MOP, read-write consistency, restartable exceptions, reader macros, optional typing, many high-quality implementations(including several commercial ones that come with excellent support), high-quality standard document, probably still the fastest dynamic language around, superb introspection support, one of the best interactive work-flows, surpassed only by smalltalk, DECADES of being tried and used in every conceivable industry and application, from super computers, space probes and AI, to web apps, games and prototyping(you'd be surprised how much software was prototyped first in lisp). AAAAAND macros too, I guess. They are nice. </smuglispweeniecomment>
- juan_juarez 14y ago> commercial ones that come with excellent support Maybe I'm just too small-time for it to matter but what, exactly, does this commercial support actually buy you? In the last 10 years of programming, I've only run into a handful of bugs in my tools. When dealing with OSS projects, they were already known and fixed in newer versions. When dealing with $BIG_DATABASE_COMPANY they told me to use a workaround and didn't fix the bug until the next major release of the software. I don't have a problem paying for commercial software, I understand it supports development and improvement of the tools, but what exactly are you getting when you spend (tens or hundreds) of thousands of dollars on licencing costs for support?
- pnathan 14y agoIdeally, being able to call up the company and have the expectation that they will ship you a bugfix as soon as they can roll one together. But that's pretty rare, IME/O.
- pjungwir 14y agoI'm not a Lisp guy, but the amazing thing I see in Lisp that is missing from other languages is that due to the extremely simple syntax, code is data and data is code. That lets you do some amazing things (Cf. SICP). On the other hand, isn't one lesson from modern computing that treating data as code is really dangerous? I have yet to see this addressed by Lisp advocates.
- skylan_q 14y agoThe way in which code is modified in Lisp is generally in the source code itself, and overtly in the run-time environment or binaries. The latter might be what you're alluding to. Allowing code to be treated as data is a very powerful thing when it comes to programming. But of course, with more power there is more danger.
- pavelludiq 14y agoDefine dangerous? Are you concerned with security? In which case, don't eval untrusted code, and you're fine. Maintainability? If done right "code is data" could improve the maintainability, or decrease it drastically, just like any other feature. If you have 80 lines of comments for every 10 lines of code, you've decreased your maintainability, comments are dangerous by that logic.
- pjungwir 14y agoYes, by "dangerous" I mean prone to security exploits. I've got nothing against Lisp--I think it's a beautiful language, and I've dabbled in CL, Scheme, and Clojure--but whenever I hear about using data as code I get a warning tingle in the back of my head. One of the lessons of the recent Ruby YAML debacle is that an executable data format will get used for untrusted input eventually somewhere or other. (Edit: For example I can totally imagine the digital circuits simulator from SICP 3.3.4 saving/reading Lisp code as an input document.) Maybe the power of Lisp's data-as-code is worth the risk. We don't stop using string concatenation because of SQL injection. It's just that I've never even read so much as a warning about this feature, and I'm curious what Lisp users have to say about it.