D
Duncan Smith
I recently started to rewrite a class and decided to take a bunch of related
methods and put them in a separate callable class. (They're all what I
would call pointwise operations on pairs of instances, they raise exceptions
for identical reasons, and they all return a new instance). It seemed like
a good idea at the time, but now I'm not so sure. So my very general
questions are:
Is this a reasonable use for a callable class?
In what circumstances are callable classes particularly useful? (Maybe I
haven't racked my brains long enough.)
Cheers. TIA.
Duncan
methods and put them in a separate callable class. (They're all what I
would call pointwise operations on pairs of instances, they raise exceptions
for identical reasons, and they all return a new instance). It seemed like
a good idea at the time, but now I'm not so sure. So my very general
questions are:
Is this a reasonable use for a callable class?
In what circumstances are callable classes particularly useful? (Maybe I
haven't racked my brains long enough.)
Cheers. TIA.
Duncan