Enchilada in Haskell
Sunday, August 5, 2007 3:44:20 PM
This isn't the fault of Factor of course: it's just that my coding style currently doesn't go well with idiomatic Factor code. Nevertheless, I can say that manipulating the stack without using named parameters was painful at times. Probably that's because I didn't factor my code enough. Anyway, I wanted to give Haskell a try, just to see if I my coding style could benefit (=cleaned up) from strong typing.
And I must say that I'm very impressed with the result. Besided strong typing, type classes, higher order functions, etc, Haskell's laziness has given me new ways of expressing Enchilada's algorithms more succinctly. Another big plus is that Haskell's pureness matches that of Enchilada, which probably gives GHC an opportunity to optimize certain algorithms and data structures more agressively. And not surprisingly: my Haskell code turned out to be very easy to (re)read (at least for me).
But the most interesting result is that the Haskell implementation of Enchilada runs MUCH faster than the previous Java and Factor implementations I did. The Glasgow Haskell Compiler is a very amazing piece of technology indeed.








Sjoerd Visschersjoerdvisscher # Sunday, August 5, 2007 7:26:48 PM
Robbert van Dalenrapido # Monday, August 6, 2007 5:41:36 AM
Also, the current site (enchilada.javaforge.com) doesn't really apply anymore. I guess I have to find another place to host both the factor and haskell version of enchilada.