Re: General semantics

From: Nilone <reaanb_at_gmail.com>
Date: Sat, 22 May 2010 05:51:33 -0700 (PDT)
Message-ID: <9f5ade7d-d988-4b53-84cb-748f5b4b5e75_at_11g2000prv.googlegroups.com>



On May 22, 12:44 pm, Clifford Heath <n..._at_spam.please.net> wrote:
> Nilone wrote:
> > ...However, I see it as one of the
> > weaknesses of OOP that I can't query the set of all instances of a
> > class.
>
> The weakness is caused by OOP's use of extrinsic identification.
> It's a serious problem, in fact it's the antithesis of what makes
> the RM special. See my other post on this subject.

It can be achieved if the compiler/interpreter/VM has a relation from OID to instantiated class, as well as the relations between classes.

>
> > I could use a static private List or Dictionary to keep track
> > of instances, but that would interfere with the GC reclaiming the
> > object automatically.
>
> Not if you use a weak reference, assuming your GC supports that.
> Java does, for example.

Interesting, I'll have to investigate.

>
> > Please don't ask me to map from the relational model to OOP.  I can't
> > do so in general, since the RM has greater expressive power than OOP.
>
> I don't think you can make a statement like that. There is no definitive
> formal model of what OOP is, so you cannot say what it is or is not capable
> of. It is true however that there could exist OOP implementations of RM,
> at least in theory, so one must assume it has at least equivalent power.
>
> That's not a recommendation of OOP, just a request to be careful with
> your claims.

Thanks, I think I was getting too bold. Certainly, it seems to me I can describe any aspect of any model of OOP in terms of relations. However, I don't know enough about the formal RM to make the claim I did, here or in my reply to your other post. Thanks for the correction. Received on Sat May 22 2010 - 07:51:33 CDT

Original text of this message