Type Slowly

Oct 28

Day log, 28th October 2010

I got a couple of things done today, at least - the work I’m doing for Harmonypark isn’t quite finished, but is coming along nicely, and with a bit of work, it’ll be done tomorrow. I’ve been running our cucumber tests to check for regressions, and have found a few minor ones - I knew our story coverage was a lot more complete than our spec coverage, but I’m slightly surprised by how much it is - I think I’m going to make a habit of immediately writing failing specs then fixing both them and the feature, whenever I come across a bug or regression that’s tested in stories but not specs.

After that, I spent a while having a look at Debasish Ghosh’s posts on Domain modelling with Haskell, and working through his example code myself. It does a really good job of explaining why I like Haskell so much - The expressiveness of the type system lends itself to exactly these sorts of problems, and with a good domain model expressed as types, the actual code can seem like and afterthought, or implementation detail. Haskell is also perfectly suited to writing DSLs it seems - as well as the fact that type declarations can look and act much like Context-free Grammars (I’d be interested to know if there’s an actual isomorphism between the two), Haskell’s also got some nice (if trivial) syntactic features that make DSLs that little bit more pleasant, using whitespace for function application being one good example

I really would like to have a go at implementing something non-trivial in Haskell -and I think I’m almost at the point where I’d be up to the task; I need to take a closer look at the options for Haskell web development frameworks and libraries, as well as options for persistance - both areas that can be pretty bewildering at first. I have got an idea for a non-trivial application that might lend itself well to being implemented in Haskell however, I might have a crack at a similar modelling exercise to the one Debasish demonstrates on my own problem domain, and see how I get on with that, before worrying about how to talk to the web and databases.


blog comments powered by Disqus
Page 1 of 1