Code review comment for lp:~vanvugt/compiz-core/fix-930412

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

On Mon, 13 Feb 2012, Daniel van Vugt wrote:

> Also regarding generated *Options, it is bad design to have so much activity in the constructor of any class (which happens to be the cause of this bug). I think separating initialization from construction was always going to be cleaner. I don't think any of this qualifies as a hack. In fact, this proposal removes hacks such as PrivateScreen::addScreenActions ()
>

I generally prefer to keep as much init code in constructors as possible
as a matter of principle. I don't like the idea of having ::init* on
objects because it means that there is coupling between the ::init* and
other functions.

Of course, the only place I'm willing to throw aside that rule is where
you need to make virtual function call in a constructor, but I generally
try to rework my design if I have to do that.

> --
> https://code.launchpad.net/~vanvugt/compiz-core/fix-930412/+merge/92720
> You are reviewing the proposed merge of lp:~vanvugt/compiz-core/fix-930412 into lp:compiz-core.
>

« Back to merge proposal