On Thu, Apr 10, 2008 at 12:53 AM, Eben Eliason <[EMAIL PROTECTED]> wrote: > > What do you mean here? > > + self.props.icon_name = icon_name > > + # This breaks style guidelines; we should store a reference > > + self._palette._icon.props.icon_name = icon_name > > I'm accessing the private _icon member of the palette class, rather > than keeping a reference to it to use for this purpose. It was a > quick hack.
This is not breaking style guidelines, but encapsulation, which is a basic concept when designing object-oriented APIs. Related links: http://en.wikipedia.org/wiki/Information_hiding http://en.wikipedia.org/wiki/Separation_of_concerns http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 http://en.wikipedia.org/wiki/Coupling_%28computer_science%29 I think we should only push hacks like this to master repositories in cases of emergency when refactoring is not an option (very close to release date). Also, if you have felt the need to do such a thing, means that our API has a problem somewhere that should be solved ASAP. Tomeu _______________________________________________ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar