Just sharing some of my inconsequential lunch conversations with you... RSS  

Sunday, September 30, 2007

If a programmer's favorite language is Blub...

Some time ago a colleague of mine, Telmo Felix, sent me this 2001 essay from Paul Graham where he explained the reason of his startup, Viaweb. In this essay, called Beating the Averages, Paul Graham describes his experience using Common Lisp, a functional language, for an upstart company, and explained how the FL paradigm was his secret weapon. In it he uses an analogy which he calls "The Blub Paradox". It goes a little something like this:

If a programmer's favorite language is Blub, which is positioned somewhere in the middle of the "power spectrum", he can most often only identify languages that are lower down in the spectrum. He can look at COBOL and say "How can anyone get anything done in that language, it doesn't have feature x", x being a feature in Blub.

However, this Blub programmer has a harder time looking the other way in the spectrum. If he examines languages that are higher up in the power spectrum, they will just seem "weird" because the Blub programmer is "thinking in Blub" and can not possibly see the uses for various features of more powerful languages. It goes without saying that this inductively leads to the conclusion that to be able to compare all languages you'll need to position yourself at the top of the power spectrum. It is my belief that functional languages, almost by definition, are closer to the top of the power spectrum than imperative ones. So languages can actually limit a programmers frame of thought. If all you've ever programmed is Blub, you may not see the limitations of Blub - you may only do that by switching to another level which is more powerful.

One of the reasons the mainstream doesn't use Haskell is because people feel that "their" language does "everything they need". And of course it does, because they are thinking in Blub! Languages aren't just technology, it's a way of thinking. And if you're not thinking in Haskell, it is very hard to see the use of Haskell - even if Haskell would allow you to write better applications in a shorter amount of time!

In college my favorite language was LISP. Even so, I've lost contact with the FL paradigm working professionally on imperative languages for over 15 years. Now I feel like a Blub programmer.

I can certainly understand the brevity, ease of understand, reusability, reliability (no side effects), functional validation and some of the powerful abstractions this languages offer us. But I need some (a lot?) of mileage on these languages to start getting into a really productive FL mindset. Ok, I admit it, and also to collect some baggage to throw to imperative skeptics.

So I'm setting a personal goal: to choose a (pure?) FL language, get acquainted with it and post my achievements.

Hope to see you soon about my first step: the language choice. I'm presently considering Haskell, or maybe ML (on the F# implementation). I admit the development environment is important for me. Here's my startup list.

No comments:

Development Catharsis :: Copyright 2006 Mário Romano