| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: What databases have taught me
On 2006-06-30 20:44:16 -0500, Chris Smith <cdsmith_at_twu.net> said:
> 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).
You'd also lose a bit of performance in accessing fields. What's more,
I'm not sure the language would be C++ any longer; though I'm not sure
of that.
>
>
>> So, in OO, a field is more often known as an instance variable.
I actually learned the term (in 1985) from the Smalltalk-80 book which created the distinction between instance-variable and class-variables. The C++ vocabulary is "member variable".
-- 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 Sun Jul 02 2006 - 18:50:42 CDT
![]() |
![]() |