Is there a plan to rewrite Browser, probably the biggest application
of the "create the shared object via a factory" pattern in our code,
or is our focus just moving forward with the correct patterns and
leaving existing code as-is?

On Tue, Jun 23, 2009 at 1:27 AM, Peter Kasting<[email protected]> wrote:
> 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
> >
>



-- 
Mike Pinkerton
Mac Weenie
[email protected]

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to