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!in1.uu.net!ftpbox!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: Tue, 21 Nov 1995 16:42:59 GMT
Message-ID: <1995Nov21.164259.22540@schbbs.mot.com>
References: <DICM58.HFH@Cadence.COM>
Sender: news@schbbs.mot.com (SCHBBS News Account)
Nntp-Posting-Host: 129.188.128.126
Lines: 36
Xref: glinda.oz.cs.cmu.edu comp.object:41073 comp.lang.smalltalk:30895 comp.lang.c++:161179 comp.lang.misc:23933

In article <DICM58.HFH@Cadence.COM> Simon Kinahan <simonk@cadence.com> writes:
> rtor@ansa.co.uk (Owen Rees) wrote:
> >If you claim that types and classes are the same, what would you call
> >whatever it is that has changed when you use 'addSelector'?
> 
> A dynamic change in type. Type does not have to be a static (ie compile
> time) concept, it can be a run-time (dynamic) one.
>
 
Exactly. In my original post that started this thread, I classified dynamic  
typing as a type system in which types can be defined and/or modified at  
runtime.

When we say that the set of operations associated with a type is invariant, we  
actually mean the traits of the object of this type, not the behavior of the  
object that we abserved.

Trait is the intrinsic property that may or may not be recognized or correctly  
recognized by us (programmers). It may or may not presented or correctly  
presented in the type that we currently defined. Behavor is the property
that is abserved and defined by us (programmers) in a type. It may or may not  
represent the trait of an object.

The advantage of a dynamic typing system is that you can still define a type  
even you do not have a clear vision of the object (traits) initially. But you  
can modify the type dynamically so that the behavior you defined for the object  
becomes closer and closer to the trait of the object.

I don't see the necessity to distiguish a dynamic type from a static type in  
the general definition of a type. If you need to classifify further distinction  
of types, you then can use the words of dynamicity and staticity.

In Transframe, a type can be either frozen to static or melted to dynamic. It  
is a signle type with different states, not two different types.

David Shang
