Xref: utzoo comp.object:3086 comp.lang.misc:7332 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwm.edu!zaphod.mps.ohio-state.edu!mips!apple!olivea!decwrl!pa.dec.com!jrdzzz.jrd.dec.com!tkou02.enet.dec.com!tkou02.enet.dec.com!jit345!diamond From: diamond@jit345.swstokyo.dec.com (Norman Diamond) Newsgroups: comp.object,comp.lang.misc Subject: Re: Run-time Type Errors in Smalltalk (was Re: blip (was...)) Message-ID: <1991Apr9.084722.14823@tkou02.enet.dec.com> Date: 9 Apr 91 08:47:22 GMT References: <1991Apr8.085602.5082@tkou02.enet.dec.com> <3288@charon.cwi.nl> Sender: usenet@tkou02.enet.dec.com (USENET News System) Reply-To: diamond@jit345.enet@tkou02.enet.dec.com (Norman Diamond) Organization: Digital Equipment Corporation Japan , Tokyo Lines: 35 In article <3288@charon.cwi.nl> guido@cwi.nl (Guido van Rossum) writes: >Python, which has dynamic typing, was strongly inspired by ABC, which has >static typing. In other aspects, the two are much more similar then >your average pair of statically/dynamically typed languages: both are >interactive and interpreted, and have large runtime packages that >replace core dumps by understandable error messages (really exceptions >for Python). [...] >Were all else kept equal, I'd still prefer dynamic typing. Dynamic typing indeed makes some things easier, as Mr. Rossum explained. It is nice to see real evidence for a change. Anyway, there is a middle ground which has also been suggested by a few others, and which some languages (e.g. Eiffel, and certain constructs in C++) come close to providing anyway. Perhaps some new terms would help explain this. Just as type and class have come to mean different things, perhaps dynamic classing vs. static classing should be recognized. With static classing, a type inference system could determine, or a programmer could specify, that a variable inherits certain known messages, though the precise type need not be known statically. I expect that static classing will have a lot more use than static typing. I would not try to ram either static typing or static classing down anyone's throat, but both can be used by disciplined developers and maintainers to catch some errors early. Although it cannot catch all errors, it certainly helps. Part of the folklore of software engineering is the magnitude of increase in costs as error detection is delayed. -- Norman Diamond diamond@tkov50.enet.dec.com If this were the company's opinion, I wouldn't be allowed to post it. -- Norman Diamond diamond@tkov50.enet.dec.com If this were the company's opinion, I wouldn't be allowed to post it.