Re: Objects and Relations

From: Bob Badour <>
Date: Fri, 09 Feb 2007 22:06:44 GMT
Message-ID: <Uf6zh.4532$>

Kevin Kirkpatrick wrote:

> On Feb 9, 1:05 am, "David BL" <> wrote:

>>On Feb 9, 12:32 pm, Bob Badour <> wrote:
>>>Marshall wrote:
>>>>On Feb 7, 6:12 pm, "David BL" <> wrote:
>>>>>On Feb 8, 6:26 am, Bob Badour <> wrote:
>>>>>>>>Consider the following
>>>>>>>>void foo(Employee* p1, Employee* p2)
>>>>>>>> // Q1. What does this mean?
>>>>>>>> if (p1 == p2) ...
>>>>>>Conditional test whether p1 and p2 point to the same variable.
>>>>>Bob is confused about the difference between 'variable' and 'object'.
>>>>Objects are a specific kind of first-class variable. The term is not
>>>>popular in the OO world but it is nonetheless accurate.
>>>As Dr. Phil would say: David is levelling. To be perfectly accurate, p1
>>>and p2 point to memory locations. They could point to ROM or to memory
>>>mapped I/O devices. If they point to ROM, one could argue they point to
>>>something constant. That said, almost all memory locations address
>>>However, 'object' has nothing whatsoever to do with the above. An
>>>instance of an object class is a variable. If the self-aggrandizing
>>>ignorant doesn't mean an instance of an object class when he uses
>>>'object' above, he is actively trying to avoid communication.
>>object is the same as an instance of a class.
>>In common usage 'variable' is only used with reference to the
>>identifiers in the source that at run time are associated with an
>>instance of some type (whether a global variable, frame variable or
>>member variable).

Here the self-aggrandizing ignorant once again tries to redefine common terms to means something 'special' that apparently only he can properly decipher. Fortunately, the educated among us have various tools to defeat such nonsense. ISO/IEC 2382 for example.

In common usage, a variable is something that changes. The term encompasses a broad range of things from bound and free variables in logic to state variables in finite state machines to anything that an assignment statement can change in an imperative language.

The question of where one allocates memory for a variable does not even come into consideration in what I wrote above.

Assuming the language above is C++, the variables could just as easily be automatic variables or static variables as dynamically allocated variables.

void main() {
static Employee sEmployee;

        Employee lEmployee, *pEmployee = new Employee();

	foo(&sEmployee,&sEmployee); // nothing from the heap here
	foo(&sEmployee,&lEmployee); // nothing from the heap here either
	foo(&lEmployee,pEmployee); // one automatic variable/one dynamic
	foo(pEmployee,pEmployee); // one aliased dynamic variable

    I'm not aware of a formal definition of variable,
>>but it's certainly unusual to say for example that allocating an
>>object from the heap is also said to be "allocating a variable".

Among the ignorant, many clear and innocuous phrases no doubt sound unusual. Formal definitions of variables abound.

> David BL: "I'm not aware of a formal definition of variable...".
> Perhaps it would behoove you to refresh you memory on the definitions
> of terms prior to criticizing the way others use them.
> A variable is a reference to a value.

Kevin, "variable" is a much broader term than that.


>>>>>Since the object type is (incorrectly) named
>>>>>"Employee" on casual reading it may appear to be true if and only if
>>>>>p1 and p2 designate the same Employee.
>>>>Just repeating the same claim over and over doesn't really advance
>>>>the coversation.
>>>He's just making up shit as he goes along. Just by acknowledging he said
>>>anything, we elevate his crap.
>>>>>In my designs I aim for correctness and brevity. Correctness is not
>>>>>negotiable. An incorrectly named class is not an option.
>>>>Of all the areas to worry about correctness, you're focusing on
>>>>naming? Naming is important, but I've never heard it elevated
>>>>to a correctness issue before.
>>>Speaking of the importance of naming, did you hear about the Hungarian
>>>space program?
>>>In any case, we have this from probably the most influential person on
>>>earth when it comes to naming:
>>>"If a quantity is incorrectly classified, we have a style problem, not a
>>The claim that incorrect naming doesn't represent a bug is true but
>>amazingly short sighted. It is a pathetic argument. Good naming
>>avoids bugs in the first place.
>>Would a mathematician do this?

Are you suggesting Charles Simonyi is not a mathematician?

I respectfully suggest both the Berkeley Bachelor of Science in Engineering Mathematics and the Stanford Doctorate in Computer Science hint that one might legitimately apply the designation to Simonyi.

>> "Definition 1: Let Employee represent the entity type for a
>>human ..."
>> "Definition 2: Let Employee represent the object type ..."
>>Should one justify the overloaded meaning in the name of brevity?
>>Should it be assumed there is no confusion until proven otherwise?
>>Amongst other things I'm concerned about how to interpret comments
>>containing the word "Employee" in the code.

Why the pretend word games when you are clearly ignorant of the meanings of the most basic terms in our field? Go away and come back when you have a clue.

>>> Do you imagine being able
>>>>to write some kind of theorem prover that will tell you
>>>>if a name is good or not? And how can you be claiming
>>>>brevity when you want to put a "-model" suffix on the name
>>>>of every class in the application domain?
>>>Face it--he's a self-aggrandizing ignorant. He declares something to be
>>>correct and everything else to be incorrect so that he has an
>>>unassailable position for self-promotion. ie. He becomes the de facto
>>>expert on what is correct.
>>>>You still haven't provided any evidence that actual programmers
>>>>actually get confused about something that they wouldn't
>>>>get confused about if they just used a suffix on the name.
>>>As Walt would say: "He's not even wrong.
>>What is Bob's motivation here? He's clearly not interested in the
>>discussion itself.

As if it wasn't already transparent, I encourage Marshall, Jim, Kevin et al to engage interesting subjects instead of wasting time helping to promote ignorants like David. Promoting the ignorants is worse than wasteful--it is counter-productive. Received on Fri Feb 09 2007 - 23:06:44 CET

Original text of this message