On Fri, Mar 14, 2008 at 07:19:44PM -0700, Darren New wrote:
[EMAIL PROTECTED] wrote:
Anyone ever seen a case where lotsa little functions *wasn't* ideal and
*very*
nice?
When the functionality you're working on has a whole bunch of state, where
you have maybe a dozen variables tracking various bits of information as
you go through an algorithm, breaking it into a bunch of functions just
obscures what you're doing. The functions don't stand on their own and you
wind up passing all kinds of stuff in arguments that's really context
instead of arguments.
Which, BTW, if one actually reads Linus's coding standard is a precise
example he gives for a longer function. He sums it up mostly as: "The
maximum length of a function is inversely proportional to the complexity
and indentation level of that function."
David
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg