[Haskell-cafe] about Haskell code written to be "too smart"

Donn Cave donn at avvanta.com
Tue Mar 24 19:43:27 EDT 2009


> Manlio -- You may be missing the point of my suggestion, which is to help
> people *find* code that suits them, rather than changing anyone's coding
> style.  Optimizing code for one segment of readers is pessimizing it for
> another.  Instead of dumbing down the smart code, I'd like to help your
> friends to help each other find dumber code, *and* to help others of us find
> smarter code.

If he really intended to promote some dumb code as a better
alternative to some otherwise equivalent smart code, then I must
have missed his point.

For me, when people defend a practice with notions like "programmer
needs be smarter/more responsible/better educated", that's like the
institutional equivalent of a "code smell".  You see it everywhere,
too.  C/C++ programmers will tell you its storage model is fine, just
"programmer needs to be more ..."

C's storage model does have its advantages, and smart code is
presumably a good thing too.  But for example, exercises like just
stripping a function of extraneous parameter identifiers doesn't make
it smart, while it may make it harder for someone to understand it
at a glance.  I do it myself, even though I claim to detest it,
which may tell us something about the appeal of exercises like that.

Go ahead and write smart, clearly the benefits outweigh the cost,
but tell us that there's no cost, no problem here if a reader who
knows Haskell has a hard time following?  >> "institution smell."

	Donn



More information about the Haskell-Cafe mailing list