[Haskell-cafe] code review?

Neil Mitchell ndmitchell at gmail.com
Mon May 23 21:02:40 CEST 2011


> 'if all == False then return False else return True' is a pretty
> confusing way to say 'return all'.  In fact, any time you see 'x ==
> True' you can just remove the '== True'.  The whole postAll thing
> would be clearer as

Before doing a code review I always demand that the author runs over
the code with HLint (http://community.haskell.org/~ndm/hlint) - they
don't have to necessarily apply all the suggestions, but they do have
to at least be aware of obvious alternatives. A code review takes a
reasonable amount of time, and it's best to use that for things that
machines can't yet figure out - rather than the simpler stuff like the
above.

Thanks, Neil



More information about the Haskell-Cafe mailing list