Am Mittwoch 10 März 2010 13:03:59 schrieb Ketil Malde:
> never introduce names if it increases the
> size of your program.  (Corrolary: don't name things that aren't
> referred to at least twice)

Objection!

If the final result of your function is a combination of a handful or two 
of long (and convoluted (expressions with ++ lots of) parentheses (as well 
(as operators and) other stuff), please, please, pretty please with sugar 
and cream, give names to the parts to expose the overall structure of the 
result.

Well, IMO, parts and intermediate results needn't even be so extreme to 
deserve a local name. Just stop and think for a moment before introducing a 
local name, "Does that help or hinder readability?". If you aren't sure, 
probably either is okay.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to