On Mon, Jun 22, 2009 at 10:22 PM, Ben Goodger (Google) <[email protected]>wrote:
> If you are creating UI on another platform and want to reuse common > code, please move the common code into a separate object that the > platform specific UI owns. Note that this is a specific application of a general good-C++-coding principle: prefer composition to inheritance. Ignore this at your peril, or like me you may end up forced to rewrite big chunks of your code when you later realize that inheritance does not extend to some future change you wanted to make nearly as flexibly as composition would have. (For the curious, this is why I spent the last week rewriting the cross-platform WebKit ICO and BMP decoders I just checked in.) PK --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: [email protected] View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---
