Path: utzoo!attcan!uunet!lll-winken!lll-ncis!helios.ee.lbl.gov!pasteur!ucbvax!ulysses!hector!jss From: jss@hector.UUCP (Jerry Schwarz) Newsgroups: comp.lang.c++ Subject: Re: static members Message-ID: <11106@ulysses.homer.nj.att.com> Date: 16 Jan 89 16:23:01 GMT References: <507@aber-cs.UUCP> <8770@alice.UUCP> <4258@paris.ics.uci.edu> Sender: netnews@ulysses.homer.nj.att.com Reply-To: jss@hector.UUCP (Jerry Schwarz) Distribution: eunet,world Organization: AT&T Bell Laboratories Lines: 25 In article <4258@paris.ics.uci.edu> Doug Schmidt writes: > >Now that C++ provides more control over class data and function >members isn't it time to consider adding control over the visibility >of type declaration abstractions as well? It would clearly be desirable and it has been suggested many times in the past. > > I suppose one reason this isn't already implemented is due to the >fact that it might break existing C programs. However, > Possibly, but this is a minor consideration. The main reason, I believe, is parsing. It is non-trivial to write a C++ grammar when you can count on the lexer to distinguish type identifiers from ordinary identifiers. (There are several cases, for example, where the distinction between an expression and a declaration is tricky) It is almost impossible if you can't. But its hard to get the lexer to understand scoping. Jerry Schwarz AT&T Bell Labs, Murray Hill