From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,b87849933931bc93 X-Google-Attributes: gidfac41,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Static vs. Dynamic typing again (was Re: OO, C++, and something much better!) Date: 1997/01/30 Message-ID: #1/1 X-Deja-AN: 213263477 references: <01bc0a1e$faed8ce0$c318b993@jarvisb> <5covaj$l0@boursy.news.erols.com> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object Date: 1997-01-30T00:00:00+00:00 List-Id: In article <5covaj$l0@boursy.news.erols.com>, Damon Feldman wrote: >Statically typed means that types are *determined* at compile time. >Dynamically typed means types are *determined* at runtime. > >Static type *checking* means checking done at compile time. >Dynamic type *checking* means checking at run time, I suppose. OK. >"Checking" catches errors, "determining" types determines what class a >variable is (and therefore how it handles messages and what data it has access >to). OK. >But dynamically typed languages just generate errors rather than explicitly do >dynamic type-checking. (This is a bit of a simplification, but that's the >idea.) Heh? Smalltalk does a type check on the *target* of the message. It does not do a type check on the (other) parameters of the message. >So Smalltalk is dynamically typed because objects can get different types at >runtime depending on execution, This is true of Ada tagged types, and Eiffel types, too. >... even though it is not type checked >explicitly beyond generating an error or automatically expanding collection >sizes, etc. My point was that the difference between Ada/C/C++/Eiffel and Smalltalk is not merely *when* the checks are done (compile-time vs. run-time), but that Smalltalk does fewer checks. In particular, it does not check the type of each parameter of a message (not at run time, not at compile time). So, it's wrong to view the difference between these languages as compile-time-type-checks vs. run-time-type-checks. - Bob