Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!cmcl2!yale!husc6!rutgers!lll-crg!mordor!sri-spam!wohler From: wohler@sri-spam.istc.sri.com (Bill Wohler) Newsgroups: comp.lang.c,comp.lang.c++ Subject: Re: Why are typedef names in the same name space as variable names? Message-ID: <9612@sri-spam.istc.sri.com> Date: Tue, 18-Nov-86 01:22:41 EST Article-I.D.: sri-spam.9612 Posted: Tue Nov 18 01:22:41 1986 Date-Received: Tue, 18-Nov-86 09:19:53 EST References: <4220@ut-ngp.UUCP> <2183@sdcsvax.UCSD.EDU> Reply-To: wohler@sri-spam.UUCP (Bill Wohler) Organization: SRI International, Menlo Park Lines: 24 Keywords: typedef variable name space Xref: mnetor comp.lang.c:82 comp.lang.c++:16 In article <2183@sdcsvax.UCSD.EDU> bruss@sdcsvax.UUCP (Brian Russ) writes: > If [typedefs and variables] 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. i haven't thought of an example which would necessitate having typedefs and variables in the same name space. it is very common to have: struct foo {...}; ... struct foo foo; thinking of different names for the structure and the variable becomes difficult when we just hack and don't expand our vocabulary reading faulkner or didion. ;-) --bw