Why are typedef names in the same name space as variable names?
Brian Russ
bruss at sdcsvax.UCSD.EDU
Sun Nov 2 12:26:47 AEST 1986
In article <4220 at ut-ngp.UUCP> dlnash at ut-ngp.UUCP (Donald L. Nash) writes:
>Why are typedef names in the same name space as variable names? ...
> ... This means that you cannot have
>something like:
>
> struct foo { /* ... */ };
>
> int foo;
>
>in C++.
>
If they weren't in the same name space, you could, in addition
to the above, write:
struct foo { /* ... */ };
foo foo;
Yuch! Do you really want/need this flexibility? In my opinion,
it's better the way it is now.
More information about the Comp.lang.c
mailing list