On Tue, Nov 15, 2011 at 12:19 PM, Dmitry Lomov <[email protected]> wrote:
>
>
> On Tue, Nov 15, 2011 at 10:59 AM, Vitaly Repeshko <[email protected]>
> wrote:
>>
>> >> http://codereview.chromium.org/8536042/diff/1/src/api.h
>> >> File src/api.h (right):
>> >
>> >> http://codereview.chromium.org/8536042/diff/1/src/api.h#newcode164
>> >> src/api.h:164: class ExtensionStates : private HashMap {
>> >> Use delegation instead of implementation inheritance.
>> >
>> > All other uses of HashMap in V8 use implementation inheritance.
>>
>> This is not true, BTW, but that's not the point. I think we should try
>> to improve the code where we can and especially when it's easy to do
>> so.
>
> Ok. I think _private_ inheritance versus delegation is really more of a
> religious question than a true "improvement".
> I don't feel strongly either way, if you do I can change that easily :)

Haven't I made it clear how strongly I feel about it? :)

Private inheritance is a closer relationship than delegation (you see
the base's protected stuff and can override the virtual functions).
It's nice to avoid close relationships when they are not necessary.


Thanks,
Vitaly

-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to