problems/risks due to programming language

Henry Spencer henry at utzoo.uucp
Fri Mar 2 04:25:26 AEST 1990


In article <259 at eiffel.UUCP> bertrand at 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 at zoo.toronto.edu



More information about the Comp.lang.c mailing list