Windows & .NET Watch: Haskell: It’s like Klingon, but with math!

Larry O Brien
April 15, 2009 —  (Page 1 of 2)
“I might as well be looking at Klingon script,” said a colleague when we were discussing Haskell, the much-admired programming language. Reading Haskell requires more than a casual acquaintance with the language, due to a programming idiom that emphasizes dense (or, if you prefer, concise) expressions, as well as Haskell's syntax, which is not part of the ubiquitous C language family. (“What? The return type is not the first thing in a function declaration?”)

“Real World Haskell,” which recently won a Jolt Award as the year’s best technical book, does an excellent job orienting the newcomer not only to Haskell’s syntax, but also to the language’s selling propositions, which are a strong type system and the ability to program without side effects in the functional style. Like Smalltalk and LISP, it is a language that will almost certainly broaden your approach to solving problems even if you do not have the chance to program in the language professionally. (On the other hand, I’ve heard it claimed that experts in the non-mainstream languages have a relatively easy time navigating between jobs in their more specialized communities.)

The book, by Bryan O’Sullivan, John Goerzen and Don Stewart, jumps right into Haskell’s type system. It correctly states that one reason why type systems are so talked about is that a type system “deeply colors the way we think and write code in that language.” There is, in my opinion, no hard-and-fast “correct” type system, and that is one reason why I don’t feel hypocritical recommending learning Haskell just a few columns after recommending learning Python, whose “duck typing” philosophy is pretty much antithetical to Haskell’s.

The short version of how these philosophies clash is whether a mismatch (say, passing an integer to a function that expects to manipulate a distinct “time” object) is detected at compile time or at runtime. I think there’s more to the debate than that, and the real question is whether explicitly answering “What have we here?” and “What sort of thing are we going to produce?” is a central, or a secondary, part of problem solving. I think there’s a good case to be made that it’s central.

Related Search Term(s): Haskell

Pages 1 2 

Share this link:


04/17/2009 01:04:55 AM EST

I like Real World Haskell as well, but for people starting out with Haskell, I think "Learn You A Haskell" is a much better introduction to the fundamental concepts of the language:

United StatesPaul Barry

04/17/2009 11:17:19 AM EST

This book is nice ~but let's no forget that haskell has some amazingly marvellous tutorials ( cf. & ) that could complement any journey towards learning it. .\

United Statessteez

Zeichick’s Take: From Haskell to DreamTab, picking winners and losers
What are the factors that will play into the success (or failure) of these products? Read More...

News on Monday  more>>
Android Developer News  more>>
SharePoint Tech Report  more>>
Big Data TechReport  more>>



Download Current Issue

Need Back Issues?

Want to subscribe?