« Limit Simultaneous Connections in Apache | Main | Making XRIs With XRDS »
Haskell vs. Java Smackdown
Defmacro.org has a small example of Haskell’s expressive power and the same code written in Java. Both take five lines of code to “[go] through a parse tree of Haskell source code, locates every reference to an identifier that ends with ‘Widget’, puts it on a list, and removes duplicates so every identifier is represented in the list only once.” Impressive. I believe that Haskell code is a bit more general and defmacro.org argues that it’s more maintainable. You be the judge.
Posted by windley on December 18, 2006 4:00 PM



Comment from Michael Neale at December 19, 2006 4:14 AM
What I find interesting is his comment on productivity and *think time*. His comment that he spends a lot of time thinking and very little typing with haskell indicates to me that its a certain type of mind that is well suited to terse functional langauges. I have always felt the same, whilst in java I would just bash things out and see what happens, in other langauges I sit and ponder (assuming I am an idiot) and when the solution presents itself it is clean and simple. Perhaps its a matter of personal style.
Comment from Francis at June 7, 2007 8:58 AM
the first line in the haskell code is innecesary.
it is like a comment.
Leave a comment
I encourage you to leave a comment below. Your email address will not be displayed on Technometria, but allows me to communicate with you directly. Your email address won't be displayed, but will be used to compute a MicroID for your comment.