Newsgroups: comp.object,comp.lang.smalltalk,comp.lang.c++,comp.lang.misc
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!newsstand.cit.cornell.edu!newsfeed.cit.cornell.edu!news.tc.cornell.edu!newsserver.sdsc.edu!news.cerf.net!mvb.saic.com!news.mathworks.com!newsfeed.internetmci.com!in2.uu.net!mdisea!mothost!schbbs!news
From: shang@corp.mot.com (David L. Shang)
Subject: Re: Types, types: static vs. dynamic -- classification
Reply-To: shang@corp.mot.com
Organization: MOTOROLA 
Date: Mon, 27 Nov 1995 17:02:52 GMT
Message-ID: <1995Nov27.170252.10232@schbbs.mot.com>
References: <ccs.peeraer.g.56.00104A5C@alpha.ufsia.ac.be>
Sender: news@schbbs.mot.com (SCHBBS News Account)
Nntp-Posting-Host: 129.188.128.126
Lines: 47
Xref: glinda.oz.cs.cmu.edu comp.object:41437 comp.lang.smalltalk:31105 comp.lang.c++:162006 comp.lang.misc:23994

In article <ccs.peeraer.g.56.00104A5C@alpha.ufsia.ac.be>  
ccs.peeraer.g@alpha.ufsia.ac.be (Geert Peeraer) writes:
> In article <vwjd9aje6nz.fsf@osfb.aber.ac.uk> pcg@aber.ac.uk (Piercarlo  
Grandi) writes:
> >From: pcg@aber.ac.uk (Piercarlo Grandi)
> 
> >David> When a type is static, it is a constant object. I.e., its state
> >David> cannot be changed during its lifetime. When a type is dynamic,
> >David> its state can be changed at runtime.
> 
> >No question about that.
> Well, well, Lot's of questions arised to me when I read the above!
> 
> I think some notions mixed up here.
> An object having a static type means to me that the object cannot change type 
> during its life cycle.

This is a pretty new definition. I never know that an object can change
its type! I know that an variable can be attached to objects of different
types during the life cylce of the variable. I also knew that an object
can be converted to another object of different type.

> (Another interpretation could be that the type itself 
> is static. This means that the characteristics (structure and behavior) are 
> not allowed to vary.)

This is correct.

> But this all has nothing to do with the state of the object. If an object is 
> defined as a constant then the contents of the object are "frozen". 
> 

So the state of a type is frozen, if the type is a constant object.

> (to be complete: A dynamic type can be defined in two ways:

> either the type or system allows an object to change to another type

How does an object change its type dynamically? Shouldn't we consider
the object a different object when its type is changed?

> or the type allows that 
> within the type some dynamics occur during the lifetime of an object.)

What dynamics? Be specific.

David Shang
