Should I give Haskell another try?
Haskell is a wonderful programming language. I'm not kidding, I really mean it. It's definitely worth checking out, at least.Haskell is purely functional, succinct, elegant, fast, compiled, cross-platform, well-documented, feature-rich, and cross-platform. On paper, it's pure awesomeness: it lets you program in a way no other language can. Programming in Haskell requires a radical paradigm shift, so it's not for anyone. I was always intrigued by it, and I started to learn it a few times in the past, on a yearly basis. Now it's that time of the year again, but before I embark in yet another almost-pointless journey, I wanted to analyze the issues I stumbled across last time I read through the countless tutorials and other awesome and free resources online. Note #1 These are issues I found about a year ago, hopefully they are not true anymore. If you think they are not true, by all means explain why in the comments, but do it in a civilized manner: I am not criticizing your language of choice, I just want to learn more about it. Note #2 I don't need to learn Haskell. I won't use it for work, not in the short term anyway. But I would use it sporadically to perform certain tasks for which I cannot use Ruby for, i.e. something that needs to be fast and not require something installed to run. Maybe some silly CLI tools, but maybe even some GUI or web/network stuff. Here's what I'm most scared about, when it comes to learning Haskell:1. Haskell is alien to what I'm used toHaskell is purely functional. If you're not accustomed with functional programming, you're in for a big shock. I'd recommend learning the rudiments of Lisp/Scheme to learn a bit of (impure) functional programming first, digest it, and then get back to Haskell. I did that already, so the shock wasn't too big. Still, the biggest differences with other programming languages are that:
- all data is immutable (no c++, i += 1, i = 1+1 and similar),
- you can handle lists of infinite numbers and other similar lazy data structures like they were peanuts,
- above all, you must deal with side effects (including IO) through monads
I could handle the paradigm shift well, I guess I could have learned Monads at some point, but the inability to install Haskell programs in a relatively easy way (e.g. Yi) really put me off. At the end of my last trip to the wonderful world of Haskell, I realized I could get things done more quickly, without the extra hassle with another language. Still, I decided to wait a bit (a year) and see if things improved. A year has passed, should I give Haskell another try?
Comments (6)
I, too, have problems trying to get oriented with Haskell. I think I am used to imagining a direct relationship between what I code and what the computer runs. With Haskell the compiler is magic - it figures out something and it executes it with very fast code (or dies with a heap overflow). There are no bad pointer; nor strings being written to disk controller registers; all kinds of run time problems one expects with large programs can NOT happen.
I have learned two things:
a) GHC is one of the best pieces of software engineering ever done. It is truly amazing.
b) Haskell gets the most done with the fewest number of keystrokes of any language out there.
But you have to have truly twisted neurons to program it.
Good too know that other Haskell projects are not like that!
Enjoy!
Leave a comment...
About
Fabio Cevasco is a technical writer, programmer, traveler, blogger, movie enthusiast, open source advocate, husband, trekkie... in other words, just another ordinary geek.
This blog is a just stream of thoughts and opinions, for well-structured articles head over to H3RALD.
- (designed by Fabio Cevasco,
- site powered by posterous)


