[Haskell-cafe] FP design
andrewcoppin at btinternet.com
Tue Nov 6 13:34:34 EST 2007
Levi Stephen wrote:
> I'm was wondering how most people work during when designing a
> functional program. Do you create data structures/types first? Do you
> work from some type signatures?
In *any* programming language, my workflow usually goes like this:
1. Think about it for a minute or two. Try to decide on good abstractions.
2. Start programming it.
3. Realise that my chosen system of abstractions is fundamentally flawed.
4. Delete source code.
5. Think some more.
6. Start coding again using new plan.
7. Iterate as required.
I'm not sure whether you can properly call that "design" though... more
like "iterative prototyping". ;-)
It used to be easier with OOP. I'm still not quite sure how to pick the
best possible abstractions in an FP context...
More information about the Haskell-Cafe