[PEAK] Regular functions vs generic functions

rdmurray at bitdance.com rdmurray at bitdance.com
Fri Feb 15 12:01:23 EST 2008


On Fri, 15 Feb 2008 at 10:40, Aaron Lebo wrote:
> Back to the practical applications of Peak-Rules. Should I design my
> applications using a mix of functions and generic functions, or only generic
> functions? If the former, what is the best way of determining 'this looks
> like a good place for a function' and 'this looks like a good place for a
> generic function'?

I'm still figuring this out, but one rule of thumb is any time you use
an if/then/elif/else, the function may be a candidate for refactoring as
a generic.  Especially if your if/then/else is really a case statement
in disguise.

--David



More information about the PEAK mailing list