Re: What databases have taught me

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Sat, 01 Jul 2006 02:30:36 GMT
Message-ID: <g7lpg.4406$pu3.103119_at_ursa-nb00s0.nbnet.nb.ca>


Chris Smith wrote:

> Robert Martin <unclebob_at_objectmentor.com> wrote:
>

>>I've looked over the thread you referenced above.  You asked whether 
>>'this' and 'self' were kind of like fields in OO languages.  I refuted 
>>this by saying that, at least in C++, 'this' is not like a field, 
>>because it's value depends on the method being called.  If the method 
>>of a base class is called then 'this' will point to the base class and 
>>not to the class of the object itself.  (This only matters in cases of 
>>multiple inheritance).  You then asked me for the definition of 
>>"field", and I did not answer that (yet).

>
> I suppose they say "fools rush in...", so I'll prove that about myself
> now. :) (By which I mean, PMFJI.)
>
> 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 don't understand all this talk of this as a field in any case. All it is is a specially designated function parameter. Whether one specifies that function parameter as object.function(param2) or function(object,param2) is strictly syntactic.

The vtable pointer on the other hand is rather more field-like. Received on Sat Jul 01 2006 - 04:30:36 CEST

Original text of this message