Re: Mixing OO and DB

From: Dmitry A. Kazakov <mailbox_at_dmitry-kazakov.de>
Date: Wed, 13 Feb 2008 23:10:59 +0100
Message-ID: <1g90q8lemvr4i.1lkcs6ub2mcws.dlg_at_40tude.net>


On Tue, 12 Feb 2008 20:48:47 -0800 (PST), David BL wrote:

> Objects are said to have identity, state and behavior. The idea that
> an object can (always) be thought of as a (data) variable that can be
> assigned a (data) value reveals a complete lack of understanding of
> OO.

> Bob's confusion between the concepts of object state versus object
> value also leads him to misunderstand the significance of
> encapsulation in the context of OO.

I hate to agree with Bob Badour, but the notion of object is indeed superfluous. It is enough to have value, type, variable. Type has behavior. Variable has state. Identity can be attributed to a variable (the name of) or a value (the type of) or a type (the behavior of, or the name of, if named). What is specific to OO, that polymorphic values have identities of the corresponding specific types, which makes dispatch possible.

[ Your note about assignment is IMO absolutely correct. Bob's lack of understanding lies in considering assignment as something God-given. Assignment is a part of behavior of a type. A type can lack this behavior. For example, either a random generator or a real-time clock cannot be assigned. This is not because some hideous OO guys have hidden assignment from us. It is because such things fundamentally cannot have any.]

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
Received on Wed Feb 13 2008 - 23:10:59 CET

Original text of this message