Re: What databases have taught me

From: Robert Martin <unclebob_at_objectmentor.com>
Date: Tue, 4 Jul 2006 18:01:38 -0500
Message-ID: <2006070418013851816-unclebob_at_objectmentorcom>


On 2006-07-02 19:22:21 -0500, Chris Smith <cdsmith_at_twu.net> said:

> Robert Martin <unclebob_at_objectmentor.com> wrote:

>> On 2006-06-30 20:44:16 -0500, Chris Smith <cdsmith_at_twu.net> said:
>>> I don't find it particularly compelling to distinguish this/self from 
>>> instance fields in that way, especially since the distinction appeals 
>>> primarily to implementation rather than the actual meaning of what's 
>>> going on.  I could very easily implement C++ in such a way that 'this' 
>>> remains constant regardless of its static type in terms of the 
>>> inheritance hierarchy.  The only thing I'd lose is a bit of performance 
>>> in metghod dispatch.
>> 
>> You'd also lose a bit of performance in accessing fields.

>
> Right.
>
>> What's more, I'm not sure the language would be C++ any longer; though
>> I'm not sure of that.

>
> I'm not at all where any doubt would come from. If the language
> behaves exactly like C++, then it's C++.

That's the point. I can't remember if the language definition demands that 'this' be different for multiply inherited base classes.

-- 
Robert C. Martin (Uncle Bob)  | email: unclebob_at_objectmentor.com
Object Mentor Inc.            | blog:  www.butunclebob.com
The Agile Transition Experts  | web:   www.objectmentor.com
800-338-6716                  |
Received on Wed Jul 05 2006 - 01:01:38 CEST

Original text of this message