Archive for the 'Programming' Category
Over the last little while I’ve made a few posts to the effect that I’m trying to come to terms with Common Lisp.
I still maintain that it’s a brilliantly powerful language, but I keep tripping over practical obstacles whenever I try to do anything useful with it:
- While the syntax is beautifully suited to its macro system, it’s a pain in the butt for everything else. Either the flood of parentheses or Polish notation would probably be fine on their own, but together they’re quite a mouthful.
- The names of a lot of things are reminiscent of times when opaque strings of letters were considered good programming. setf – WTF? = and eq and eql and equal and equalp that might all do different things, depending on the implementation? Seriously?
- All the available compilers suck in at least one way. As far as I can tell, there’s no free (as in whichever) Common Lisp compiler that (a) can cleanly compile to an executable (without statically dumping the universe into it), (b) does threading properly, and (c) has a well-supported Windows port. In the learning stages none of those are critical, but it bugs me that at some point in the future I’m either going to have to do without portability and whatnot, or write my own compiler.
- The REPL and SLIME and all that are great, and I do like the idea of interactive programming, but there are all kinds of weird quirks about it. As a quick example, SBCL (the compiler that comes closest to handling all the issues I just mentioned) prints pages of warnings every time I compile after the first time, because I’m redefining all my functions. I couldn’t find a way to turn this off – I’m sure there is one somewhere, but it’s just offputting.
I could probably barge through a lot of these problems, and some of them are probably more about my preconceptions from programming in Algol-family languages for something like 20 years, but as a whole they just make me depressed about trying to approach it. Which is not good, because it doesn’t take much to get me to procrastinate, and then I just sit there feeling lazy.
A couple of months ago I read a bit about Scheme, which is the other main Lisp variant. On the surface, it seems to have more sensible naming, less frustrating compilers, and a cleaner design. On the other hand, it (apparently) has a less powerful macro system, weaker support from third-party libraries (which is saying something), and leaves out a lot of features in the name of minimalism. Scheme vs Common Lisp seems to be one of those vi vs emacs sort of religious wars – see this Stack Overflow question for example.
So fuck it all. Lisp shmisp. (Or maybe lithp.)
I’m doing this to learn practical skills and keep my brain ticking. In a perfect world, a programming language would get out of the way and let me do what I want without bringing all its baggage along. Maybe that’s asking too much, I dunno.
So my Lisp education is going on indefinite hiatus. Instead, I’m going to wade back into the world of Haskell. Haskell was the first language I studied at university, under the great Richard Buckland (more on that later), and I feel like it’s time for a revisit, this time from the perspective of Real Programming rather than as an educational tool.No comments