Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!dali.cs.montana.edu!khan!icsu8209 From: icsu8209@khan.cs.montana.edu (Glassy) Newsgroups: comp.lang.misc Subject: Re: Dynamic typing -- To Have and Have Not (was Runti Summary: umm, i don't think so... Message-ID: <3616@dali> Date: 6 Mar 91 18:02:20 GMT References: <584@coatimundi.cs.arizona.edu> <1991Mar6.024730.19073@engage.enet.dec.com> Sender: usenet@dali.cs.montana.edu Organization: Montana State University, Dept. of Computer Science, Bozeman MT 59717 Lines: 58 In article <1991Mar6.024730.19073@engage.enet.dec.com> grier@marx.enet.dec.com () writes: >In article <584@coatimundi.cs.arizona.edu>, gudeman@cs.arizona.edu >(David Gudeman) writes: >|> The term "weak typing" has been used for this feature, but it has >|> also been said that Pascal and C are weakly typed languages, so I didn't >|> want to used that word. > > That's interesting. I'd certainly agree that C is weakly typed, but >with Pascal requiring name compatibilty of types (rather than >structural, as in C and Modula-2,) I'd put it in the "strong typing" >category. (Strong typing is not necessarily "good." Pascal's a neat >language, but it lacks tons of features for modern software >construction...) Um, I don't think so. Pascal (at least ISO-something-something-6000) did not state which form type equivalence would take (structural vs. name equivalence). Vendors thus are free to do what they like, in this regard, which yields us an interoperability disaster. Modula-2, in Wirth's definition, uses name equivalence. All the Modulas I've used conform to this. Modula-3 by DECWRL, on the other hand, mandates structural equivalence. IRT the definitions of 'typing', discussions such as this thread are useful for helping all of us to communicate on the same (set of?) wavelength(s). The definitions of typing I've seen (in the literature) hew fairly closely to David Gudeman's. Interesting to note the variety of languages that can fall under a single category, WRT typing: static typing: FORTRAN ;all vars/funs declared explicitly ABC ;types determined implicitly at text-entry time by textual context and by example ML ;types determined at compile time via type inference. dynamic typing: Lisp ;"we'll find out (what type it has) when we get there." others??? typeless (aka untyped): BCPL ; everything's a machine word, so don't bother declaring stuff. "strong" typing: Modula, Euclid: static typing with tight controls on what may be coerced to what. "weak" typing: C: static typing with with loose/no controls on coercions. ------------------------ -- -- Lou Glassy --Cicero