I thought I should follow up on my previous posts, since in at least two previous posts I’ve criticised aspects of the Haskell experience. In general, I point out ways things can be improved or are sub-optimal a lot more than I praise them, but I don’t want it to seem as if I hate Haskell. To the contrary, I’m still really enjoying my experiment in rewriting my Python sound change applier in Haskell.
The core language has a lot of good points. In general, I quite like a functional style of programming, so Haskell is a pretty good fit in that regard. It’s certainly a better fit than the other languages I commonly use: MATLAB has (slow) function handles but is otherwise strongly imperative, and Python’s limited support for a functional style also tends to come with a speed hit. Both my other common languages also emphasize the use of mutable state and objects, and in some circumstances make persistence expensive because of slow copying.
The other most notable difference between Haskell and MATLAB/Python is control flow. Haskell makes a more declarative style possible. Outside of imperative style do-blocks, links between bits of code are controlled by function application (ordered) and separation into separate named functions/values. Since the order of named functions and values is mostly irrelevant to program interpretation, there’s a lot of freedom to reorder and rearrange for semantic reasons in Haskell. You’re free to put the most important code first and leave the rest until later, regardless of dependencies (where code blocks are a feature that should definitely be exported to other languages).
The other important difference is of course static vs dynamic typing. Haskell is the only language I currently use which is very strongly statically typed, and it really does make a difference. On the plus side, there is some truth to the statement that the rigid type system catches a lot of the stupidest errors you can make, while being powerful enough to not get in the way too much. Certainly, types as found in Haskell are much better than the brain-dead type systems of languages like Java, which require vast amounts of boilerplate and are less flexible. On the downside, sometimes it does feel to me that writing generic code in Haskell, which facilitated by type classes in theory, isn’t as easy in practice because of poor organisation of the standard libraries. And the system can make quick prototyping and experimentation harder.
I’m also slowly getting to grips with the various concepts commonly considered tricky in Haskell. My repertoire of monads is slowly increasing, since my code now contains instances of the IO, State and Maybe monads as well the Parsec monad. There are probably also a few places where I could use the List monad, but it seems like overkill when I can use functions like concatMap. Apart from the monads, I haven’t yet touched any of the other complicated stuff like type level dark magic, but I haven’t really feel the need to yet.
Posted by chrisdb on 2010-10-04
Tags: haskell
Comments
Xrumer – Hey you ever heard of Xrumer ? If you do then you must know the power of its Back Links. For them that dont know, its the most overall comprehensive link builder out there. But heres the best part these guys have taken xrumer to a whole new level. There Xrumer mods will allow posting to over 60 different platforms and growing monthly. Which is equal to access to over 10,000,000 different sites or more. Hey check it out. Xrumer
These professional Xrumer is not a joke but the real deal. Just contact them and they will give you proof. Many SEO services employ there Xrumer backlinks, plus many link sellers out there.
Watch your website go straight to the top of the ranks with this Xrumer.
Like I said before just check it out. Xrumer SEO
I know it definitely was the best business decision I ever made!! I now set on the first page of all top three search engines with all my sites.
Posted by Belliblem on 2011-10-23 10:50:55
I enjoyed this, great stuff! Stop by and say hi sometime windermere hotels
Posted by DonHerbarni on 2011-11-23 10:43:11
gay porno
Posted by Unoreterm on 2012-01-11 09:24:31
carpets brands
Posted by Unoreterm on 2012-01-20 03:54:44