Re: What databases have taught me
Date: Fri, 30 Jun 2006 19:46:09 -0500
Message-ID: <2006063019460916807-unclebob_at_objectmentorcom>
On 2006-06-23 18:44:26 -0500, "Keith H Duggar" <duggar_at_alum.mit.edu> said:
[Quoted] > Robert Martin wrote:
>> On 2006-06-23 07:47:48 -0500, "David Cressey" <dcressey_at_verizon.net> said: >> >>> When the apostles of OO said, "forget everything you >>> ever learned about programming", I tuned out. >> >> It wasn't the apostles who said that; it was the acolytes.
>
> Which are you Uncle Bob? And why haven't you answered my
> questions about your definition of "field" among others?
>
> http://groups.google.com/group/comp.object/browse_frm/thread/24dfa436896b15b9/58fe82352e2b0e9f?lnk=st&q=&rnum=2#58fe82352e2b0e9f
Shouldn't
>
> a "mentor" be a little more responsive? The
> questions seem fairly simple, can't you answer them?
I have a limited amount of time to play in this particular sandbox, so I don't always see all the questions asked of me.
[Quoted] [Quoted] 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).
[Quoted] So, in OO, a field is more often known as an instance variable. It is a variable within the data structure that holds the state of the [Quoted] object. When you copy an object, all it's fields get copied. When you store an object all of it's fields get stored. When you copy an object, 'this' is not copied. When you store an object 'this' is not stored.
-- 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 Sat Jul 01 2006 - 02:46:09 CEST