2013 Update: I was young and stupid when I wrote this.
I fear that Haskell is doomed to succeed. — Tony Hoare
I
♥ Lisp. I think it's the best tool we have, at the moment, for many applications.
I don't really love Haskell that much, but I track its progress with awe. (When I say
Haskell, I'm not only speaking about Haskell per se, but also about all the FP languages in its halo, like Ωmega, Agda, Epigram, ...)
And when I look at Haskell, it seems obvious to me that it's out to eat Lisp's lunch. In fact, eat all other languages' lunches.
The gist of this post is:
In the not-so-far future, Haskell will be able to do everything Lisp can do now (and more), but in an adjustably-safe, statically-verified manner.
What do I mean by that?
Adjustably-safe: In this mythical, not yet-existing, but clearly on-the-horizon "Haskell", you'll be able to choose how much safety you want. You'll have "knobs" for increasing or decreasing compile-time checks for any property and invariant you desire. Or don't desire. You'll be able to switch between Lisp-style dynamic typing, Haskell-style static typing, and probably even C-style weak/no-typing. In the same program.
Statically-verified: Haskell is clearly moving towards
dependent typing, which in theory, allows the expression of
arbitrary invariants that are maintained statically, without having to run the program. Dependent typing is the weirdest and most
awesome thing to expect of programming, this side of quantum computers.
Lisp, as it stands, can't do any of that, and won't be able to do any of that. That's simply a fact. Why? Because it's coming at the problem from the wrong direction. Trying to graft an interesting type system or verification onto Lisp is simply too heroic and ill-specified a task. Lisp starts with ultimate freedom/unsafety, and you can't constrain it. Haskell starts with ultimate bondage/safety, and then, piece by piece, adds that freedom back. On a theoretically well-founded basis.
Right now, Lisp has certain advantages. As a command or scripting language where ultimate dynamism is desired (Emacs), it's still clearly superior. But Haskell is encroaching on its habitat from all sides, just like it's encroaching on the habitats of all other languages. Right now it may appear pointy-headed and harmless. But I think it's unstoppable, and doomed to succeed.
How does that make Lisp a big hack? If my theory is right, then once Haskell will be able to
do everything Lisp can do now (and more), all the while maintaining
adjustable safety and
static verification, I think it will be justified to call Lisp a big hack - because it
lacks the possibility of this safety and verification, in principle. (Of course you have to subscribe to the idea that this safety and verification is something that's good and superior. I do.)
(
HN,
Reddit)