comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Inherited Methods and such
Date: Thu, 20 Sep 2007 18:22:42 +0200
Date: 2007-09-20T18:21:33+02:00	[thread overview]
Message-ID: <11m13st1f92kf$.m8s6y8mc8ebk.dlg@40tude.net> (raw)
In-Reply-To: 1190296353.624737.150940@y42g2000hsy.googlegroups.com

On Thu, 20 Sep 2007 06:52:33 -0700, Maciej Sobczak wrote:

> On 20 Wrz, 10:12, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
> wrote:
> 
>>> My expectations are different during the lifetime of the object. Hence
>>> - the behavior that I expect is time-variant. Hence - the type changes
>>> over time. End of story.
>>
>> If you say that an object of the type T1 can take values of the type T2,
>> such that not T1<:T2, then either:
> 
> What is T1<:T2 ?

Subsumption.

> Whatever it is, your assumptions are still wrong.
> There is no point in discussing the concept of "taking the value"
> here, because the value is meaningful in the context of its type only.

Even better, so objects have no values, but many types...

[...]
> There is no such thing as object of type T taking new value, nor the
> value changing type. Neither value nor type is constant here. They
> flow together as the object is progressively constructed/destructed
> and every single moment in time the object has a valid value of *some*
> type.

Right, this is called untyped. The rest is handwaving.

>> Huh, let us take this and consider the predicate "dynamically". Then:
>>
>>    forall x of T, dynamically(x)
> [...]
> 
>> For this
>> reason any object has exactly one type. No more, no less.
> 
> Yes. Every single moment the object has one type. But the time is
> passing and the object's classification flows together with time.

Nope, the result is another object, *because* you cannot change the type.
Even if you cast and per chance the address of the result is same (why
should anybody care?), it is a different object. Otherwise, you would have
to drop the concept of single type and go untyped.

(BTW classification. "Type" is another word for "classification." Types
classify sets of values)

> This is not true in C++.

It is no matter how C++, Ada or PHP would define it. Because it is a model
that describes what is going on in the given language. Here the programming
language is just an object language, a subject. A model is only wrong when
it describes things incorrectly. If C++ calls type "class," that does not
bother me, naming conventions do not influence the model. Ada subtypes and
Liskov subtypes as known in CS have nothing in common either. So what?

The model I am talking about can describe C++, though it cannot describe it
in a way that some nice and desirable constraints, like object-type
bijection, statically determinable types, statically comparable types,
would necessarily hold. This classifies C++ as weakly typed, if not
untyped. Is that surprising?

The choice of a model is a question of personal preferences. I don't like
models where an object has many types but no values. It is
counterintuitive, and I believe inconsistent. Provided, somebody would take
care and tried to formalize such a mess.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2007-09-20 16:22 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-17 14:26 Inherited Methods and such shaunpatterson
2007-09-17 15:11 ` Ludovic Brenta
2007-09-17 16:46   ` shaunpatterson
2007-09-17 19:07     ` Ludovic Brenta
2007-09-17 20:22   ` Maciej Sobczak
2007-09-17 21:07     ` Ludovic Brenta
2007-09-18 14:27       ` Maciej Sobczak
2007-09-18 14:27       ` Maciej Sobczak
2007-09-18 15:25         ` Dmitry A. Kazakov
2007-09-18 18:34           ` Ludovic Brenta
2007-09-18 19:29             ` Dmitry A. Kazakov
2007-09-18 19:39               ` Ludovic Brenta
2007-09-18 20:49                 ` Dmitry A. Kazakov
2007-09-18 21:10               ` Simon Wright
2007-09-18 20:39           ` Maciej Sobczak
2007-09-18 21:12             ` Dmitry A. Kazakov
2007-09-19 14:49               ` Maciej Sobczak
2007-09-19 15:16                 ` Dmitry A. Kazakov
2007-09-19 22:13                   ` Maciej Sobczak
2007-09-20  8:12                     ` Dmitry A. Kazakov
2007-09-20 13:52                       ` Maciej Sobczak
2007-09-20 16:22                         ` Dmitry A. Kazakov [this message]
2007-09-20 20:45                           ` Maciej Sobczak
2007-09-21 18:59                             ` Dmitry A. Kazakov
2007-09-21 21:02                               ` Maciej Sobczak
2007-09-22  8:48                                 ` Dmitry A. Kazakov
2007-09-22 21:53                                   ` Maciej Sobczak
2007-09-23  8:41                                     ` Dmitry A. Kazakov
2007-09-23 20:36                                       ` Maciej Sobczak
2007-09-24  9:32                                         ` Dmitry A. Kazakov
2007-09-24 15:02                                           ` Maciej Sobczak
2007-09-24 19:20                                             ` Dmitry A. Kazakov
2007-09-25 20:53                                               ` Maciej Sobczak
2007-09-26 10:42                                                 ` Dmitry A. Kazakov
2007-09-26 21:31                                                   ` Maciej Sobczak
2007-09-27 15:02                                                     ` Dmitry A. Kazakov
2007-09-27 21:02                                                       ` Maciej Sobczak
2007-09-26 12:21                                                 ` Robert A Duff
2007-09-26 12:54                                                   ` Dmitry A. Kazakov
2007-09-26 21:37                                                   ` Maciej Sobczak
2007-09-26 23:47                                                     ` Randy Brukardt
2007-09-27 21:08                                                       ` Maciej Sobczak
2007-09-28  0:44                                                         ` Randy Brukardt
2007-09-28 20:32                                                           ` Maciej Sobczak
2007-09-28 22:35                                                             ` Randy Brukardt
2007-09-29 23:58                                                             ` Robert A Duff
2007-09-26 12:26                                                 ` Robert A Duff
2007-09-26 21:50                                                   ` Maciej Sobczak
2007-09-26 22:20                                                     ` Ray Blaak
2007-09-27  0:01                                                     ` Randy Brukardt
2007-09-27 13:39                                                     ` Robert A Duff
2007-09-27 14:54                                                       ` Dmitry A. Kazakov
2007-09-28  0:35                                                         ` Randy Brukardt
     [not found]                                                           ` <7p6gc1s9imfa$.kmvwf5zyf8e9.dlg@40tude.net>
2007-09-28 22:53                                                             ` Randy Brukardt
2007-09-29 20:37                                                               ` Dmitry A. Kazakov
2007-09-27 21:23                                                       ` Maciej Sobczak
2007-09-28 19:12                                                         ` Robert A Duff
2007-09-28 19:02                                                     ` Robert A Duff
2007-09-28 19:42                                                       ` Robert A Duff
2007-09-28 20:44                                                         ` Maciej Sobczak
2007-09-28 22:40                                                           ` Randy Brukardt
2007-09-29 20:35                                                           ` Dmitry A. Kazakov
2007-09-29 20:52                                                             ` Maciej Sobczak
2007-09-30  8:38                                                               ` Dmitry A. Kazakov
2007-09-29 23:47                                                             ` Robert A Duff
2007-09-29 20:48                                                           ` Maciej Sobczak
2007-09-29 23:39                                                             ` Robert A Duff
2007-09-30  8:38                                                               ` Dmitry A. Kazakov
2007-09-29 23:42                                                           ` Robert A Duff
2007-09-25  1:59                                   ` Randy Brukardt
2007-09-25  8:59                                     ` Dmitry A. Kazakov
2007-09-25 21:02                                       ` Randy Brukardt
2007-09-26 12:42                                         ` Dmitry A. Kazakov
2007-09-18  4:03 ` Steve
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox