[SciPy-dev] Generic polynomials class (was Re: Volunteer for Scipy Project)

Fernando Perez fperez.net at gmail.com
Sat Oct 17 03:26:45 EDT 2009


On Fri, Oct 16, 2009 at 12:58 PM, Anne Archibald
<peridot.faceted at gmail.com> wrote:
>
> If we're implementing the heavy lifting in a procedural interface,
> then the object implementations will just be plumbing (as I see your
> analyzer objects are). So on the one hand there's not much code to be
> shared, but on the other it's all boilerplate that would benefit from
> code sharing.

Yes, in our case it was a deliberate design decision: we were in a
sense hedging our bets.  Since it's so easy to go down the wrong
design path with complex objects, we basically punted and made the
user-visible objects trivially simple from an
algorithmic/computational perspective.  This puts all the 'smarts' in
more cumbersome procedural interfaces, but it also means that the same
procedural foundation can support more than one OO design.  So if
either we get our design horribly wrong, or it's simply not a good fit
for someone, there's no major loss, as they can just build their own
interface on top of the same machinery, and very little code is lost.

I'm not sure this idea works really well in the long run, but we got
there after being bitten (many times) by complex OO codes that end up
'trapping' a lot of procedural smarts within, and thus condemning them
to be lost wherever the OO design doesn't work well.  We thus tried to
 separate the two concerns a little bit.

More experience will tell us whether the approach does work well, and
what its limitations in practice turn out to be.

Cheers,

f



More information about the SciPy-Dev mailing list