Monday, January 26, 2009

Recently I embarked on the journey of learning the Haskell programming language. Much of my choice to do so was brought about by my dissatisfaction with the progress of language features being added to Java. Before my inbox gets flamed into oblivion, let me explain.

I’ve been a reasonably accomplished java developer for the better part of a decade now, and until now, always felt that Java was powerful “enough” for me to accomplish my various project in, within reasonable timeframe. The amount of code already written and ready for use in Java is, in a word, staggering. The amount of documentation, tutorials, examples, code snippets, and forums to help the wayward Java developer is momentous. You have no reason to fail, as a Java developer, since most of the “heavy lifting” won’t be written by you.

Through my years ad a Java developer I helped my co-workers that were new to Java, learn the language, the libraries & frameworks, the build tools & the IDEs (anyone else remember forte4j and Visual Age), the performance settings of the IBM JVM vs. the SUN JVM (yes, it used to matter../sigh). I spent years learning, helping others learn, advocating, attending conferences, and defending Java as a safe, pragmatic, choice for project development.

So why the dissent now?

Curiosity killed the Java developer. Flirting with Ruby, Python, and Erlang opened the door to the functional style of programming, Haskell kicked the door wide open.

I’ve always loved coding, the act of predictably guiding the computer towards a goal. Typically the goal being a problem’s solution. When coding in Java, I always accepted that there was a certain amount of cruft necessary to complete a task, never wondering if a more efficient methods were possible. Filtering, transforming, aggregating, I do these all over the place, why are they so wordy in Java? Other languages closer to Java, say C# for example, have found ways to improve repetitive tasks in their sources, why can’t java? Feature after feature, I’ve watched C# (and others) grow, while Java remains stagnate, why?

Learning Haskell has probably been one of the single most rewarding experiences of my professional software engineering career. I would encourage any developer to do the same, not because its marketable(not right now at least), not because it does all your work for you without you needing to be “distracted by the details”, but because it is enlightening. Discovering a language so densely packed with features combined with very predictable behavior has made life moving forward as only a Java developer seem lackluster and an exercise in mediocrity, but it's what pays the bills :-/

No comments: