Type checking for typedef's (new feature)

David desJardins desj at brahms.BERKELEY.EDU
Fri May 30 20:28:03 AEST 1986


In article <361 at batcomputer.TN.CORNELL.EDU> garry%cadif-oak at cu-arpa.cs.cornell.edu.arpa writes:
>What I would like is for typedef names to be considered by the compiler as 
>DIFFERENT from the underlying types. The compiler should then allow an
>implicit (or explicit) cast back and forth between the derived and under-
>lying types -- this will avoid breaking existing code. The improvement over
>the current state of things will happen when I ask the compiler "please tell
>me about possibly nasty implicit casts!"
> 
>Is it reasonable? Is it hard to implement? Comments?

   Yes.  No.  This is how almost all typed languages (except C) handle
their types, and I agree that it is vastly preferable.  But don't hold
your breath waiting for C programmers to give up their super-weak typing.

   -- David desJardins

P.S. If you want to flame me do so via mail; I don't read this group...



More information about the Comp.lang.c mailing list