[Haskell-cafe] on finding abstractions ...
stephen.tetley at gmail.com
Sun Feb 14 09:55:50 EST 2010
Promoting a slightly contrary view, I'm not sure that abstraction
should be a goal in itself. Richard Gabriel makes a point of valuing
'habitable' code over abstract code in his 'Patterns of Software' book
(free from his website now that it's out of print). Habitable code
being code you can live with - understand and modify.
I'd look to making the code readable in the first instance, if you are
working from a published algorithm can you code it line-for-line
(hiding supplementary definitions in where-clauses or helper functions
when necessary)? Or, if you are working from your own algorithms,
maybe you need to work a little bit more on factoring the algorithm
before it comes to writing the actual code.
More information about the Haskell-Cafe