Newsgroups: comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!newsstand.cit.cornell.edu!portc01.blue.aol.com!portc02.blue.aol.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!cam-news-hub1.bbnplanet.com!uunet!in3.uu.net!uucp3.uu.net!world!bobduff
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: Static vs. Dynamic typing again (was Re: OO, C++, and something much better!)
Message-ID: <E4n2rn.n4@world.std.com>
Organization: The World Public Access UNIX, Brookline, MA
References: <JSA.97Jan16141937@alexandria> <32E7BB32.6A9D@calfp.com> <32E85588.1978@parcplace.com> <32ec94c5.12380906@news.ipass.net>
Date: Sun, 26 Jan 1997 23:33:23 GMT
Lines: 26
Xref: glinda.oz.cs.cmu.edu comp.lang.smalltalk:50064 comp.lang.eiffel:17739 comp.lang.ada:56537 comp.object:60346

In article <32ec94c5.12380906@news.ipass.net>,
Paul Perkins <paul.perkins@pobox.com> wrote:
>Another reason to think that some kind of declarative type feature
>could be useful in Smalltalk is that good Smalltalk programmers
>typically use naming conventions and sometimes even comments to
>indicate what kinds of values are expected to be bound to each
>variable. The idea of formalizing this just enough so that the
>information is available to automated tools is appealing to me.

Indeed.  The Smalltalk programmer writes

    grindOn: aString and: anotherString

whereas the Ada programmer writes

    procedure Grind_On(X, Y: String);

Obviously both programmers think its useful to know what type is
expected for a formal parameter.  The latter has the advantage that it
can't accidentally be incorrect information.

Note that this has nothing to do with static vs. dynamic type checking
-- Smalltalk doesn't check that aString and anotherString are indeed
Strings -- it doesn't check statically *or* dynamically.

- Bob
