Newsgroups: comp.object,comp.lang.smalltalk,comp.lang.c++,comp.lang.misc
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!gatech2!swrinde!newsfeed.internetmci.com!in2.uu.net!usc!sdd.hp.com!hplabs!hplextra!hplb!cdollin!kers
From: kers@hplb.hpl.hp.com (Chris Dollin)
Subject: Re: Types, types: static vs. dynamic -- classification
Sender: news@hplb.hpl.hp.com (Usenet News Administrator)
Message-ID: <KERS.95Nov17135258@cdollin.hpl.hp.com>
In-Reply-To: David N. Smith's message of 13 Nov 1995 14:43:29 GMT
Date: Fri, 17 Nov 1995 20:52:58 GMT
References: <vwjviowz091.fsf@osfb.aber.ac.uk> <vwju44dzlwt.fsf@osfb.aber.ac.uk>
	<RMARTIN.95Nov11040737@oma.com> <486vum$9ru@gap.cco.caltech.edu>
	<487lih$ts9@watnews2.watson.ibm.com>
Nntp-Posting-Host: cdollin.hpl.hp.com
Organization: Hewlett-Packard Laboratories, Bristol, UK.
Lines: 45
Xref: glinda.oz.cs.cmu.edu comp.object:40858 comp.lang.smalltalk:30751 comp.lang.c++:160607 comp.lang.misc:23884

David N. Smith <dnsmith@watson.ibm.com> writes:

   In article <486vum$9ru@gap.cco.caltech.edu> Michael S. Klein,
   mklein@alumni.caltech.edu writes:

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

   Amen. And saying otherwise doesn't make it so.

Both of you seem to have an a-priori notion of ``type'' but, since neither
of you say what it *is*, how can we tell what you mean?

For example, the notion of ``type'' that I have says something about
the properties of values, namely, which operations make sense on various
combinations of values, and what the results of those operations are. It's
not arbitrarily confined to the compile-time checking available to some
implementation, nor to some particular bit-level representation of values.
Given the types of the names and operations, it says that:

	92 + 'some string'
	realpart( "word" )
	sin( ["a list of five words"] )
	length( car.car_wheels)( 2 ) )
	read_card_rulings( some_value_wot_is_not_a_filename )

are all nonsense, whereas

	47.9 + 123456789987654321
	realpart( 92 +: 2 )
	["a little list"] <> [99]
	install_ruling( [['this is a line'], ['and so is this', 'and this']] )
    	type.stringin.incharitem.pdtolist.hd @member colours

are all sensible.

Smalltalk seems to fit quite happily into this framework, given that sending
``doesNotUnderstand'' is the way it notifies type errors. So in what sense
are you saying that ``Smalltalk-80 does NOT have types''? And, if you 
present a notion of type that Smalltalk does not satisfy, what advantages
does this notion have that we should take it as *the* notion of type,
rather than just one among many?
--

Regards, "I know three kinds: hot, cool, and 'what time does the tune start?'".
Kers     [The Beiderbeck Connection]
