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!newsfeed.internetmci.com!in2.uu.net!nntp.cadence.com!news
From: Simon Kinahan <simonk@cadence.com>
Subject: Re: Types, types: static vs. dynamic -- classification
Content-Type: text/plain; charset=us-ascii
Message-ID: <DICLpu.HDr@Cadence.COM>
Sender: news@Cadence.COM
Content-Transfer-Encoding: 7bit
Organization: Cadence NVision
References: <486vum$9ru@gap.cco.caltech.edu>	<1995Nov14.144339.14327@schbbs.mot.com>	<48fo6t$qsb@gap.cco.caltech.edu> <vwjka4zgsqa.fsf@osfb.aber.ac.uk>
Mime-Version: 1.0
Date: Mon, 20 Nov 1995 15:29:53 GMT
X-Mailer: Mozilla 1.1N (X11; I; SunOS 4.1.3 sun4c)
X-Url: news:vwjka4zgsqa.fsf@osfb.aber.ac.uk
Lines: 37
Xref: glinda.oz.cs.cmu.edu comp.object:40998 comp.lang.smalltalk:30845 comp.lang.c++:160978 comp.lang.misc:23915

pcg@aber.ac.uk (Piercarlo Grandi) wrote:

[ stuff about whether type is a run-time or compile-time notion deleted ]

This is a daft argument. All objects in all languages have a type, and
in some languages (including smalltalk) they are tagged explicitly
with their type (that is, class). In some languages (not including
smalltalk), varibales also have a type that limits the type of the
values they can contain.

>Michael> In a typed language, the compiler tries to assert something
>Michael> about all possible executions of a program with all possible
>Michael> inputs.  Smalltalk does nothing like this.
>
>Then I guess that there are no typed languages...

Wrong. A number of languages (mostly fairly obscure ones, ever
heard of ML, or Hope, or Haskell ?) have a strong enough
type system to make the assertion that no run-time failures
will occur. This provides some of the advantages of having
dynamic type tagging like Smalltalk, without adding to data
size or making run-time type checks necessary.  

>Michael> Even calling class end type as equivalent concepts does not
>Michael> work.  An object can change it's class.
>
>That's, at least in Smalltalk-80, illegal type punning. Besides this
>sort of type punning has been available in some "typed" languages for a
>long time. For example (just to daze the audience with my knowledge of
>obscure languages) EL1 from Harvard.

You don't need to get that obscure. Look at C++ and the infamous
downcasting problem.

PS. You obviously know a different set of obscure languages to me :-) 
     1

