Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!mips!bridge2!jarthur!uci-ics!bvickers From: bvickers@ics.uci.edu (Brett J. Vickers) Newsgroups: comp.lang.c Subject: Re: C strongly typed? Message-ID: <25F6E8B7.16437@paris.ics.uci.edu> Date: 8 Mar 90 23:20:23 GMT References: <259@eiffel.UUCP> <1990Mar1.172526.28683@utzoo.uucp> <849@enea.se> <1990Mar7.182230.5517@utzoo.uucp> <25F5AA40.27091@paris.ics.uci.edu> <25695@masscomp.ccur.com> Reply-To: bvickers@ics.uci.edu (Brett J. Vickers) Organization: UC Irvine Department of ICS Lines: 20 ftw@quasar.westford.ccur.com (Farrell Woods) writes: >>In article <1990Mar7.182230.5517@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes: >>> C's type system is not extensible unless >>>you count "struct", but the language is strongly typed -- mixing random >>>types is not allowed. > >Henry's right! The point is that `char' and `int' (and, `short' and `long') >all describe *integer* quantities. It's just that the range os values which >each of these "types" can hold differs due to the amount of storage allocated >to a variable of a given type. If C were as strongly typed a language as Ada is, it would require that a cast (or conversion) be used before setting two different "types" of integers equal. If C were as strongly typed a language as Ada (or Pascal) is, it would not allow integers to be accessed and stored as char types. I'm not knocking this flexible typing; I find it extremely useful. -- bvickers@bonnie.ics.uci.edu