Xref: utzoo comp.lang.c:26668 comp.lang.misc:4357 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!lanl!lambda!jlg From: jlg@lambda.UUCP (Jim Giles) Newsgroups: comp.lang.c,comp.lang.misc Subject: Re: C strongly typed? Message-ID: <14262@lambda.UUCP> Date: 7 Mar 90 22:19:20 GMT References: <849@enea.se> Lines: 29 From article <849@enea.se>, by sommar@enea.se (Erland Sommarskog): > [...] > C strongly typed? If I write something like: (I don't speak C > so the syntax is probably bogus.) > typedef apple int; > typedef orange int; > apple a; > orange b; > ... > a = b; Yes C is strongly typed - by the definition of 'strong typing'. The phrase 'strong typing' means that the type of any object in an scope can be determined at compile time. So, in the example you gave, it is quite trivial to determine the data types of all the objects given just by examining the text. C is not only strongly typed, but it requires explicit declarations of everything. You are confusing 'strong typing' with 'strict type checking'. The later term refers to languages which discourage (or even disallow) any mixed-mode operations without _explicit_ type coersions. To be sure, strict typing is easier to do if the language is also strongly typed - this is probably how this confusion of terms (which is common) originally arose. But a strict language isn't necessarily strongly typed. Any language which allows late binding is (again by definition) _not_ stongly typed - but such a language may still restrict mixed-mode operations; it would just have to do all the checking at run-time. J. Giles