Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!microsoft!jimad From: jimad@microsoft.UUCP (Jim ADCOCK) Newsgroups: comp.std.c++ Subject: Re: "module" facility for top-level namespace control Keywords: namespace, module Message-ID: <72119@microsoft.UUCP> Date: 1 May 91 22:04:38 GMT References: <1991Apr19.163253.22253@kestrel.edu> <1991Apr19.183922.1982@kodak.kodak.com> <5143@lupine.NCD.COM> <1358@appli.se> Reply-To: jimad@microsoft.UUCP (Jim ADCOCK) Distribution: comp.std.c++ Organization: Microsoft Corp., Redmond WA Lines: 44 In article <1358@appli.se> niklas@appli.se (Niklas Hallqvist) writes: >I've thought about this, and come to the same conclusions as Ron. >Well, how should the "use" syntax look like? How about: Again, some simple alternatives to "use" blocks is for programmers to use references as a short named alternative: WRAPPERCLASSNAME::doThis(); WRAPPERCLASSNAME::doThat(); WRAPPERCLASSNAME::doTheNextThing(); becomes: WRAPPERCLASSNAME const x& = ....; x.doThis(); x.doThat(); x.doTheNextThing(); which is hardly more onerous than: use WRAPPERCLASSNAME { doThis(); doThat(); doTheNextThing(); } Another alternative is: class X : public WRAPPERCLASSNAME { public: static void doABunchOfStuff() { doThis(); doThat(); doTheNextThing(); } } So, I'd rather see implementors spending their time and effort to make existing features of the language more efficient, and thereby more widely used, rather than adding new syntax in order to perform occasional spot optimizations.