<pedrocorreia.net ⁄>
 

<Why it's so Hard for Imperative Programmers to Learn Functional Languages ⁄ >

clicks: 189 189 2007-02-18 2007-02-18 goto misc myNews misc  Bookmark This Bookmark This





I'm not currently using any functional languages like Haskell and Lisp, but I'm certainly comfortable with them. I'm certainly no Haskell guru, but I'm good enough to use higher-order functions, ADTs, monads, etc. While I have a good grasp of functional programming concepts now, I had to travel a long, hard road to get to this point.

Picture if you will a programmer with a C-family background discovering Haskell for the first time. He's heard some smart people talk about how cool it is, and it says right there on haskell.org that it will substantially boost your productivity, so he momentarily puts down his Java Enterprise Web Framework With a Really Long Name and starts reading a Haskell tutorial.

At first, everything goes well. He's impressed by the fact that you don't have to constantly compile code to see the effects of your program. But after using the REPL as a calculator for a few minutes, he decides to check out how you write Hello World. This is where things start going downhill.

He notices that the chapter on I/O is tucked away in the Advanced section. Curiously, he flips to it and discovers, not an explanation of console and file I/O, but a disscussion of type classes, monads, and the like. He wonders if everything will make more sense if he just visits the appropriate chapters, but no luck; Haskell looks like one big incomprehensible mess. Our imperative programmer goes back to his Java Enterprise Framework, and that is the end of that.

It's very difficult for a programmer used to imperative programming to find a good Haskell tutorial, or a good tutorial on any other functional language for that matter. It's not that they explain Haskell badly; many of them explain it rather well. It's just that they explain the wrong parts of Haskell. Procedural programmers are more often interested in how to do I/O and create GUIs rather than in how to use Parsec or write monads.

This is one of the major barriers to adoption of the more esoteric languages; lack of learning material for "normal people". To rectify this, I thought about how I would write a Haskell tutorial.

este é só um excerto do artigo, para aceder ao artigo completo, clique no link em baixo:
this is just a small excerpt from the article, to access the full article please click in the link below:

http://qftblog.wordpress.com/2007/02/14/why-its-so-hard-for-imperative...





myNews <myNews show="rand" cat="misc" ⁄>

Top 10 Tips For Working From Home

For the last 13 years, I have worked from home both occasionally as an employee (...)

clicks: 126 126 2008-06-07 2008-06-07 goto url (new window) stationstops.co... goto myNews misc


Mac vs. Windows from a web developer's perspective

Say what you will about Macs or PCs, one thing's for sure. If you plan on doing (...)

clicks: 170 170 2007-06-07 2007-06-07 goto url (new window) devthatweb.com/... goto myNews misc


The Forbidden City: Beyond Space and Time

is a partnership between the Palace Museum and IBM. The goal of the project is t (...)

clicks: 66 66 2008-10-10 2008-10-10 goto url (new window) beyondspaceandt... goto myNews misc


To rewrite or not to rewrite, that is the question

People seem to have given up completely on the notion of rewriting software. Thi (...)

clicks: 227 227 2007-01-05 2007-01-05 goto url (new window) codecraft.info/... goto myNews misc


Is Microsoft Pushing too much, too quick?

I often find myself exhausted and frustrated not getting enough time to know eve (...)

clicks: 245 245 2007-06-22 2007-06-22 goto url (new window) c-sharpcorner.c... goto myNews misc


The Latest .NET, a Brilliant Strategy

This week Microsoft released Visual Studio 2008 and the .NET 3.5 Framework. Whi (...)

clicks: 151 151 2007-11-26 2007-11-26 goto url (new window) truckingnerd.co... goto myNews misc


12 myths about how the Internet works

Here's the rub: IP has continued to evolve, but no one has been carefully docume (...)

clicks: 32 32 2008-11-24 2008-11-24 goto url (new window) networkworld.co... goto myNews misc


6 Reasons Why You Shouldn't Be a Web Worker

Web working is not for the faint of heart. Most WWD regulars who've spent over a (...)

clicks: 126 126 2008-06-04 2008-06-04 goto url (new window) webworkerdaily.... goto myNews misc