[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [IMP-dev] decorators



I propose adding constructors to the decorators from Particle* to
express the third.

I'm not sure I follow you - you want to add extra methods to Particle?
It doesn't seem like that would scale - external modules could add their own decorators, and obviously they can't modify the Particle base class.
No, an extra method to decorator: a constructor from the particle*.

If you replace checks with assertions, the Python interface would need
to have some checking in it, because we don't want to crash the
interpreter if somebody has a typo in their script and uses the wrong
decorator.
Agreed. I think you can do things like wrap all *Decorator::*Decorator calls, right? If that is so, it is pretty easy since there is already a method on the decorator to check if a Particle* is OK.