top | item 7655164

(no title)

ozataman | 12 years ago

Please note that this is pretty much how you model Haskell programs as well: Keep as much of your logic as possible in pure code and interface/drive that with imperatively written stateful code. Purely functional languages (e.g. Haskell) do not remove your ability to code imperatively, they rather augment it so that you can better reason with it while doing it. Things like first class IO actions (that you can pass around) and explicitly marked state (i.e it's clear what you have in context and what you don't) make for some pretty satisfying solutions you wow yourself with.

It is common to hear in the Haskell community remarks like "Haskell is the best imperative language I've used."

discuss

order

carterschonwald|12 years ago

I agree whole heartedly, people write some pretty impressive shared state concurrent programs in haskell, precisely because they know how much state is shared.