Newsgroups: comp.object,comp.lang.smalltalk,comp.lang.c++,comp.lang.misc
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!newsstand.cit.cornell.edu!news.kei.com!news.mathworks.com!uunet!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: Tue, 14 Nov 1995 14:43:39 GMT
Message-ID: <1995Nov14.144339.14327@schbbs.mot.com>
References: <486vum$9ru@gap.cco.caltech.edu>
Sender: news@schbbs.mot.com (SCHBBS News Account)
Nntp-Posting-Host: 129.188.128.126
Lines: 49
Xref: glinda.oz.cs.cmu.edu comp.object:40657 comp.lang.smalltalk:30613 comp.lang.c++:160003 comp.lang.misc:23835

In article <486vum$9ru@gap.cco.caltech.edu> mklein@alumni.caltech.edu (Michael  
S. Klein) writes:
> Smalltalk DOES NOT have types.  If one wishes to call classes types, things
> will become confusing.  If one wishes to define a new thing in Smalltalk, and
> call that thing, a 'type', great.  But first define what a type is.
> 

General Definition:

TYPE: qualities common to a number of individuals that distinguish
them as an identifiable class: as
 (1) the morphological, physiological, or ecological characters by
     which relationship between organisms may be recognized
 (2) the form common to all instances of a linguistic element

Specific Definition in Programming Languages:

TYPE: an abstraction mechanism that specifies a group of objects
(or values) distinguishable as a variety in terms of:
 (1) their structure -- how they are constructed with a set of
     their components (the structure of a primitive object (or value)
     is built-in);
 (2) their functionality -- how they contribute to the development
     of a larger whole or the rest of the system in terms of a set
     of operations (methods).

So, why a SmallTalk class is not a type?

> Smalltalk is different.  Smalltalk-80 does NOT have types.

Please be specific. What difference makes you to make the above
conclution?

The fact that a SmallTalk variable is not contrained by a class
(type) cannot be a reason to deny a SmallTalk class being a type.

I would never try to distinguish the concept of class from a type
and the concept of subclass from subtype IN GENERAL. Otherwise
the only thing I can contribute is the confusion.

But I could tell the difference of a SmallTalk class from a C++
class, based on individual cases.

David Shang





