Wednesday, March 12, 2008

Farewell Haskell

UPDATE 05/08/2014
After writing a lot of functional code in JavaScript using LoDash I'm starting to appreciate the type system.

I decided to stop torturing myself and part with Haskell. Why I did that?1st I don't give a damn about its type system and Haskell was putting it in my throat.2nd I didn't learned anything new. Well beside bunch of tricks, and I wasn't looking for tricks. I expected new paradigm, novel idea or an elegant combination of existing ones but there was nothing of those to inspire me to continue wrestling with the static typing.The best description of static typing came from Aatu Koskensilta
One of the reasons to prefer a powerful type system is precisely the ability to encode some such conditions and information in the types. The usefulness of a type system depends on which conditions are expressible in it, and with what amount of effort.
In any case, if one does not use the type system for anything useful it obviously will be nothing but a burden. Learning to program in languages such as Haskell involves learning how to use its type system to do useful thing, just as one would learn to use macros etc. when learning Common Lisp or Scheme. Don't think of the type system as a straight-jacket, think of it as something to hack, a tool -- or just continue writing your code in a dynamically typed language if that's your thing.

And static typing is definitely not my thing. But if I decide to get in those waters someday I will look no further than Qi , it has the most powerful type system, it's optional and I could even hope that it'll be asdf packaged. My current state of mind is probably best described by below :
It may interest you to know that most of my development time for that was spent typing: paging through the library, trying things out at the REPL, tweaking, debugging, iterating. It's a style I find much easier than staring at a blank screen and thinking very hard, and one for which I find forgiving languages like Perl and Lisp are much better than Haskell. - Ladislav

It's good to have a heroes, but sometimes it's even better to see them crucified, just to make sure they're worthy.

Farewell Haskell, you're joining the company of languages that didn't taught me much about programming nor changed the way I'm thinking .As Alan Perlis once said: "A language that doesn't affect the way you think about programming, is not worth knowing". The rest of the crew consists of pascal, basic, delphi, php, c#, ocaml, python and sql.


  1. So your ten-day-or-so trying to ‘get’ Haskell ended without you appreciating it? OK, but that is not a reason to bash the language. The reason you felt ‘tortured’ by it may well be somewhere else and not in the language.

    ‘I didn't learn anything new … beside bunch of tricks’

    Haskell is nothing like mediocre, imitative, or about ‘tricks’. Putting it in a row with BASIC, PHP etc. is ridiculous.

    From this one, and your other blog piece, ‘Lisper's first look at Haskell’, it is easy to tell that you did not learn much of, or about, Haskell. Talking of ‘variables being assigned only once’ is telling. (There is no assigning at all – a name in Haskell is just a label of some value. There is no ‘once’ or ‘many times’ either, as there is no notion of time and of action sequencing.) You seem to have missed the language's model of computation altogether.

    If you ‘don't give a damn about its type system’, then you don't want to learn anything about Haskell at all, because its type system is designed to be, and is, an aid to the programmer, and is not some accident in its evolution.

    You speak of Haskell's ‘complex syntax’. That puzzles me a lot. Compared to what is it complex? If it's Common Lisp, then Haskell's syntax is way simpler.

    ‘Haskell designers took features from older languages Lisp and Prolog …’

    That, too, is very far from the truth.

    You say that your opinion on Haskell is directed to lispers. Whoever is your audience, your statements are misleading. To a programming language lover or a programming practitioner, Haskell has much to offer, one only has to be open to learning.

  2. Haskell is lazy and pure. These two features are definitely new things worth learning to lispers.

  3. Boyko
    I don't have much free time to spend years learning some language so I always give them a little test drive. If the langauge don't prove itslef worthy in 2 or 3 weeks I just dump it. And I share my experience gained in those 2-3 weeks. Single assignment of variables is one of the things that made me curios about Haskell. But I feel that Haskell is overpormising and underdelivering.
    Also all the language choices I found unacceptable like static typing or complex systems are from my personal view. I would rather be arrogant and tell what I think than politically correct and water everything.
    I hate obligatory static typing and every language that enforces it is a stalinistic piece of junk. Optional static typing is probably good idea.I would like to use static typing now and then but WHEN I WANT.
    Haskell syntax is complex compared with lisp s-expressions because in lisp I have (operator operands). There is few exceptions but the general idea holds. On the other hand Haskell is mixture of prefix, infix, indentation, markers and case syntax.
    And about ripping off Lisp and Prolog I'm really interested what original thing Haskell has compared with Lisp and Prolog beside static typing and single assignment. Pattern matching is just dumb down single side unification borrowed from Prolog and what language did introduced the functional style and higher order functions. Hint it was specified in 1958.

  4. Wei Hu

    I could write purely functional code in any language and it is very easy to do it in lisp. But I also have a choice to use other paradigms when they fit better my problem domain.
    Lazy is also nothing new for lisp programmers. As it could be implemented as lirary. The technique that is presented in sicp long time ago. Maybe even before that.

  5. Boyko

    This is a my personal blog and contains my personal opinions and experiences. I prefer to present with a black and white view then start sentences with "It depends..". Its what's called free speech and universal truth for MYSELF. Its up to the reader to judge what's appropriate and inappropriate for THEMSELVES and decide what kind of shade of gray will they accept or reject. If you think something else you're free to express yourself on a medium you prefer. I even granted you a right to do it on my own blog. If that's not enough for you post a reply on your blog/site/whatever and share your truth.

  6. Slobodan, you apparently don't know what type systems are for, in languages like Haskell or ML. It is not about to helping the compiler (like in C). It is not about catching some errors of some kind. It is about catching all errors of some kind. It is about proving that your program has some properties. Proving that your program respect some invariants. Proving that some kinds of error are completely absent.

    As far as I know an optional type system can hardly guarantee anything. Unless you use it all the time of course, but what would be the point of optionality?

    You should try the ultimate test: brevity. I wrote a 400 lines utility for doing web sites. It's written in idiomatic Ocaml, and I suspect Haskell could be a bit shorter. Try to do shorter in Lisp. Let's see who wins, by what margin. If you don't feel like rewriting the whole thing, just rewrite the menu module. I made my system so you can easily plug it in.

    Now if you win by a wide margin, I will take a hard look at the power of Lisp. If you don't, admit that static type systems aren't hoops through which you have to jump. For if they were, you would have won by a wide margin.


Note: Only a member of this blog may post a comment.