Xref: utzoo comp.software-eng:2981 comp.lang.c:26428 comp.lang.misc:4295 Newsgroups: comp.software-eng,comp.lang.c,comp.lang.misc Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: problems/risks due to programming language Message-ID: <1990Mar1.172526.28683@utzoo.uucp> Organization: U of Toronto Zoology References: <6960@internal.Apple.COM> <259@eiffel.UUCP> Date: Thu, 1 Mar 90 17:25:26 GMT In article <259@eiffel.UUCP> bertrand@eiffel.UUCP (Bertrand Meyer) writes: >> Personally, it's the little things like this that make me >> believe that everyone should ABANDON C and move on to C++(two others being >> function prototyping and strong type checking)... > > How can the words ``strong type checking'' be applied to a language >in which any variable may be cast to any type? In which you declare the >type of a generic list element to be ``pointer to characters''? Come now, at least criticize the modern language, not a caricature of what you think it was fifteen years ago. Many "systems programming" languages allow deliberate unsafe type conversions if you request them, and they are not considered any less "strongly typed" for it. Modern C is a strongly-typed language by any reasonable definition, although there are still a lot of antique compilers around that don't fully enforce its rules. (NB you can't cast any variable to any type in C, only certain combinations are valid.) And any modern generic pointer declaration will say `void *' not `char *'. There are enough real problems with C and C++ without making up silly strawmen. (P.S. They remain eminently usable languages for people who know what they're doing, although incompetents and novices should definitely avoid them. Alas, all too many of the "real programs" in the world are written by incompetents and novices...) -- MSDOS, abbrev: Maybe SomeDay | Henry Spencer at U of Toronto Zoology an Operating System. | uunet!attcan!utzoo!henry henry@zoo.toronto.edu