Re: OO versus RDB
- From: "David Barrett-Lennard" <davidbl@xxxxxxxxxxxx>
- Date: 19 Jun 2006 19:29:26 -0700
Dmitry A. Kazakov wrote:
On 18 Jun 2006 12:42:47 -0700, David Barrett-Lennard wrote:
Dmitry A. Kazakov wrote:
May I ask you what is 25000? Isn't it a lie? 25000 is a name of an integer.
So when you call GetSalaryOf, SELECT SALARY ..., look at a cheque, peer
into the screen, you always deal with lies. Now, when String [10] returns
'x' it is also a lie, because it tells you nothing about whether the [?]
String "really" *has* 'x' at 10. Because all these are abstractions. Any
meaning is conditional to some assumptions made. And anything is a model of
something.
You say "anything is a model of something". What is a grain of sand a
model of?
Yes, that's the question! What M stands for in RM? You claim that it is
automatically good because R is simple.
For you that is the question - because you are obviously interested in
philosophical debates about meta-physics. I'm here to talk about
computer science. Yes, like you say, we have different methodologies.
My intention is to make statements that have information content in
them. My choice of terminology is unimportant. What matters is
whether my claims are testable and ultimately whether they are useful.
You should either accuse me of not doing science (because my claims
are not actually testable), or else reveal a counter example.
Here is one of my claims..
Claim 1: Given some source code for a class definition and adequate
documentation, it is always possible to tell unambiguously whether a
run time instance "is what it is".
This is testable isn't it? Despite all your posts I don't even know
your position on this claim because you use meta-physics.
Definition 1: A run time object instance has (unique) identity if it
"is what it is".
This definition is testable in the sense that there might be an example
where most people would agree that it gives an unintuitive result.
So I'm claiming that the semantics of object identity is actually tied
to the testable claim above.
Consider this definition...
Definition 2: A run time object instance has (unique) identity (within
the running process) if it has a unique machine address.
I consider this to be a bad definition of object identity because it
includes objects that pretend to be something else. In particular it
includes "value types".
Computer memory can be used to represent numbers (say). Now it is true
that bytes only give us a model of a number. That is rather fortunate.
It would be nasty if changing bytes in memory could manipulate the
(abstract) numbers in the Platonic realm!
It would be great! My favorite program is:
if 2 + 2 = 5 then
5 := 4;
end if;
In the previous post I already discussed the fact that value types are
in fact merely models.
By contrast, IMO object types claim to be "what they are".
That's your claim
Yes
That is why objects have "unique identity" as they say.
Oh, this is a vast topic. In short, I disagree, see the recent thread about
identity.
I shall.
If they're not "what
they are" then they're just a model and we're back to a many to one
relationship between models and what is modelled.
So?
Because it relates back to the definition of object identity and
ultimately to the semantics of an OO program.
Why identity of model object cannot model one of real ones?
Of course a model can have its own independent identity. I'm just
saying it shouldn't claim to be the "real deal".
This distinction is important and practical. Consider a "Printer"
class. It is very practical and very useful to know whether an object
instance really is trying to be a printer or merely model a Printer.
It's nice to know the side effects of calling methods on an object! If
the object really proxies to a printer then it has some claim to be of
type "Printer". Otherwise it is a lie.
For our quest into reality I would propose to start with Boolean = {true,
false}. Is "true" a self-thing? Is it real? Is RM good for Booleans?
I'm not particularly interested in a philosophical discussion about the
foundations of mathematics, and the question of where does meaning
come from.
Well, but the distinction you introduced has a philosophical nature. It is
outside the scope of programming languages. I just said that I don't share
your philosophy.
I don't agree. I don't even think my statements are particularly
abstract.
Now it is a little unfortunate that I chose a String class above
because it is customary for programmers to treat strings as "value
types" rather than "object types". ie for them, all strings that are
equal in value are equivalent. Now a class instance that represents a
value type is in fact a model of a mathematical entity that resides in
the Platonic realm. For that reason you may well be justified in
claiming that a String class should really be named StringModel. This
allows for many StringModel instances to represent the same String in
the Platonic realm.
Maybe your definition makes sense in platonic philosophy, but it does not
make any sense to me. I don't know what is real. I don't understand how
person [what is a person?] can be more or less real than string. You could
probably go further, if you referred to distinction between interface and
implementation. Which is also relative. So sorry, these bells don't ring to
me.
I wonder whether you have a genuine misunderstanding of what I'm
saying. I never said a human is not real.
But I do!
Yes, because you are interested in meta-physcial debate.
For what its worth, philosophically I actually believe that there is
nothing but the Platonic realm. All possible computations exist
(simply because they can) and what we call "reality" is a trick played
on us as self-aware-substructures in a pure mathematical setting.
However, none of this is at all relevant.
I'm
simply saying that it is wrong to claim that an object in computer
memory *is* an instance of a human, rather than merely a model of a
human. I'm sure you agree with this.
Yes
What I can't seem to persuade you of is my
proposal that according to the "semantics of OO", an object has to "be
what it is" - as a thing that lives on a real computer and really
encapsulates some state using some real bytes in real computer memory.
Yes, that is a run-time object. A table is also an object. I don't see any
difference.
Therefore if an object is a model it should say so loud and clearly.
I do it.
So allow me to instead use the example of a button GUI element, where
it is customary to think of a Button as an object type, not a value
type. I claim that this is another example of a class that "is what it
is". If we regard the combination of hardware + software as a real
device, then we can *see* the button on the screen, and we can control
its behaviour by calling methods on the object.
No you are wrong here. For example, in medical systems there is an
interesting requirement. When an alarm is raised (by a bedside monitoring
system), the software shall ensure that the visual appearance of the alarm
[a GUI element] is indeed on the screen. There are many techniques, apart
from correctness verification. Some are scanning video buffer. Now, tell me
what is what here?
It's very simple... An OO design has classes. In a (proper) use of OO
these relate (in a semantically consistent way) to real objects that
reside on real hardware that have real behaviors. I'm proposing that
it is wrong to abstract this fact away.
Is GUI element a self-thing?
I don't know what you mean by that.
Cheers,
David Barrett-Lennard
.
- Follow-Ups:
- Re: OO versus RDB
- From: Dmitry A. Kazakov
- Re: OO versus RDB
- References:
- OO versus RDB
- From: David Barrett-Lennard
- Re: OO versus RDB
- From: Dmitry A. Kazakov
- Re: OO versus RDB
- From: David Barrett-Lennard
- Re: OO versus RDB
- From: Dmitry A. Kazakov
- Re: OO versus RDB
- From: David Barrett-Lennard
- Re: OO versus RDB
- From: Dmitry A. Kazakov
- Re: OO versus RDB
- From: David Barrett-Lennard
- Re: OO versus RDB
- From: Dmitry A. Kazakov
- Re: OO versus RDB
- From: David Barrett-Lennard
- Re: OO versus RDB
- From: Dmitry A. Kazakov
- Re: OO versus RDB
- From: David Barrett-Lennard
- Re: OO versus RDB
- From: Dmitry A. Kazakov
- Re: OO versus RDB
- From: David Barrett-Lennard
- Re: OO versus RDB
- From: Dmitry A. Kazakov
- OO versus RDB
- Prev by Date: Re: Searching OO Associations with RDBMS Persistence Models
- Next by Date: Re: OO versus RDB
- Previous by thread: Re: OO versus RDB
- Next by thread: Re: OO versus RDB
- Index(es):