[PEAK] Regular functions vs generic functions
Phillip J. Eby
pje at telecommunity.com
Fri Feb 15 13:30:43 EST 2008
At 10:40 AM 2/15/2008 -0600, Aaron Lebo wrote:
>Wow. This is all very informative.
>
>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'?
Er, I thought we already explained that.
If you're using PEAK-Rules, you can just write functions -- and add
rules as needed. There is no up-front decision to make, because
*all* functions are generic, as far as PEAK-Rules is concerned.
Of course, some functions, you'll know in advance are generic --
anything that you would use a visitor pattern for, for
example. However, it still doesn't matter, because with PEAK-Rules
you still just define a regular function, and then add rules as needed.
More information about the PEAK
mailing list