[Haskell-cafe] Is my code too complicated?

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Sat Jul 3 08:35:15 EDT 2010

Ertugrul Soeylemez <es at ertes.de> writes:


> I fear that my code is already too difficult to understand for
> beginners, and it's getting worse.  But then I ask myself:  I've got a
> powerful language, so why shouldn't I use that power?  After all I
> haven't learnt Haskell to write C code with it.  And a new Haskell
> programmer doesn't read my code to learn Haskell.  They first learn
> Haskell and /then/ read my code.
> Is this a real problem or am I just exaggerating?
> What do you think?

I think that code should be written in as clear a manner as possible
without affecting performance or functionality.  That is, don't write
the code complicated just for the sake of it, but don't be afraid to use
extensions or advanced techniques if you think it's worth it.

That said, whilst the problem might be more pronounced in Haskell, do
all Java programmers instantly understand Factory patterns, etc.?  This
isn't a Haskell-specific pattern...

Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com

More information about the Haskell-Cafe mailing list