Path: utzoo!attcan!uunet!snorkelwacker!tut.cis.ohio-state.edu!pt.cs.cmu.edu!n.sp.cs.cmu.edu!flc From: flc@n.sp.cs.cmu.edu (Fred Christianson) Newsgroups: comp.lang.c Subject: Re: C strongly typed? Message-ID: <8356@pt.cs.cmu.edu> Date: 9 Mar 90 15:33:47 GMT References: <259@eiffel.UUCP> <1990Mar1.172526.28683@utzoo.uucp> <849@enea.se> <2963@goanna.oz.au> <4401@hydra.Helsinki.FI> Organization: Carnegie-Mellon University, CS/RI Lines: 36 In article <4401@hydra.Helsinki.FI> grano@cs.Helsinki.FI (Kari Gran|) writes: >a strictly (strongly? - not well defined terms anyway) typed language. Here's ONE POSSIBLE definition. I'm not arguing that "strongly typed" is well defined. I'm just giving one definition. From Aho, Sethi and Ullman's _Compilers,_Principles,_Techniques,_and_Tools_: A language is strongly typed if its compiler can guarantee that the programs it accepts will execute without type errors ... For example if we first declare table: array[0..255] of char; i: integer and then compute table[i], a compiler cannot in general guarantee that during execution, the value of i will lie in the range 0 to 255. The C equivalent example char table[256]; int i; shows that C is not "strongly typed" according to Aho, Sethi, and Ullman. My other compiler/language books don't even use strong in their discussion of type checking. MY OPINION: For any reasonable definition of "strongly typed" C is not "strongly typed". ---- Fred p.s. Let's not argue about a reasonable definition for "reasonable".