[Haskell-cafe] Re: on finding abstractions ...
apfelmus at quantentunnel.de
Tue Feb 16 11:48:43 EST 2010
Günther Schmidt wrote:
> I've got a problem, in short my haskell code sucks. While it does work
> and I do manage to use higher-orderish aspects quite extensively to make
> my code more concise it still is nowhere abstract, always concrete and
> thus always with lots of boilerplate.
> Oh I have gotten better compared to when I started but on the
> abstraction slope I'm still stuck.
> So fellows, what is the next stop on my road to enlightenment? I really
> think I need best to start from scratch. I think I'm sufficiently
> familiar now with most of Haskell's technicalities but how do I climb
> the ladder of abstraction?
As others said, there are already a few existing abstractions that you
can take advantage of, like applicative functors, functional references
(aka data-accessor) or monads; it pays to know them well.
Other than that, many abstractions will probably be some kind of domain
specific language. Since those are by definition specific to the problem
domain, it's hard to give general advice. I'd suggest to learn from
Paul Hudak. The Design of a Pretty-printing Library.
Philip Wadler. A prettier printer.
Simon Peyton Jones, Jean-Marc Eber, Julian Seward.
Composing contracts: an adventure in financial engineering.
More information about the Haskell-Cafe