April 6th, 2004

  • evan


A month or so ago, someone asked my opinion of lisp. I haven't really used it so I can't provide a fair judgement, but I've really tried hard to understand and I just don't get it. I think a few hard-core lispers read this, and I'd really appreciate corrections.

So: what distinguishes lisp (scheme, etc.) as a language? For example, I think functional is good, or at least interesting, but other languages do that as well. What does lisp have that the others don't?
  • Super-simple syntax/code as data. The argument I always read is that it makes it easier to transform and parse programs, which seems to me to be not especially useful, but of course I've never used a language that did it well...
    The flip side is [yes, here's everyone's complaint] that it's really impossible to read. I know people can get used to it or whatever, but every time I read a paper that has lines in the middle of a block of code that end with )))))) I wanna shoot the author.
  • Dynamicism. The fact that pretty much everything's a list means that the code is very flexible; most lisp-using papers I read take little bits of code and slowly mutate them in a way you don't see in pretty much any other language. The other side to this is the static argument: you modify a data structure somewhere and you have no idea what effects it could have. One of the unification papers I was reading yesterday had a function that returned either an environment (a list) or false! Yuck.
  • A lot of history. There were even lisp machines! This means that there's been a whole lot of code and effort stuck into lisp. That means they have good tools, huge libraries, and compilers that're supposed to generate rather fast code.
Beyond that, um... what? As far as I can tell popularity of the language floundered because of fragmentation, because everyone got all OO-happy (even though it can be done in lisp), because the good lisps were really expensive, and because the supporting libraries were never really well collected. But again, I also have only really been exposed to scheme.

It's really hard to read lisp advocacy because it seems the sorts of people who usually write it have decided it's the One True Language without much consideration of others. For example, in objects have failed (where he makes some points I agree with) there's all these needless "static thinkers" digs that aren't true at all; languages like self follow the lisp vision of powerful tiny parts and dynamicism while still being OO.

Speaking of self (and dynamicism versus speed in general): Type inference of Self [!!!]:
We have designed and implemented a type inference algorithm for the full Self language. The algorithm can guarantee the safety and disambiguity of message sends, and provide useful information for browsers and optimizing compilers.

Self features objects with dynamic inheritance. This construct has until now been considered incompatible with type inference because it allows the inheritance graph to change dynamically. ...