C strongly typed?

Erland Sommarskog sommar at enea.se
Sun Mar 11 22:44:41 AEST 1990


Charles Hannum (CMH117 at psuvm.psu.edu) writes:
>But if I may ask, what's your point?  Anyone programmer with half a brain
>would know that a Granny Smith isn't equivalent to a tangerine.

Stupidity. Ever heard of the work "mistake"? Say that I have the 
routine Macedonia declared as (in Ada syntax):

   FUNCTION Macedonia(Granny_smith : IN Apple;
                      Tangerine    : IN Orange) RETURN Some_type;

Now, I'm calling this from another module. In which order comes
the parameters now? Ah, it was probably the orange first, wasn't
it? A strongly typed language like Ada will catch this error.
With C or Pascal I have to spend half a day to find out why the
damned fruit salad doesn't taste as intended.
-- 
Erland Sommarskog - ENEA Data, Stockholm - sommar at enea.se



More information about the Comp.lang.c mailing list