Newsgroups: comp.std.c++ Path: utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!geac!alias!rae From: rae@alias.com (Reid Ellis) Subject: Re: "module" facility for top-level namespace control Message-ID: <1991May3.183328.16900@alias.com> Sender: news@alias.com (USENET News) Organization: Alias Research, Inc. Toronto ON Canada References: <1991Apr25.060721.12694@alias.com> <1991Apr29.174033.29627@alias.com> <1991Apr30.202357.13791@kestrel.edu> Date: Fri, 3 May 91 18:33:28 GMT Reid Ellis (that's me) writes: |Why don't we simply use a syntax which already evokes this concept -- |using "extern"? | |extern NIH { |#include |}; Scott Layson Burson writes: |someone who |misspelled a type name following `extern' wouldn't find out about it |until link time, and rather indirectly at that. Yeah, oh well. |Besides, the namespace construct *doesn't* mean that the stuff between |the braces is `extern'. So I would still prefer the keyword |`namespace'. Well, in a last-ditch attempt to avoid a new keyword :-) how about the following? extern default NIH { #include }; Someone mentioned also using "default" by itself, comme ca: default NIH { #include }; But the word "default" on its own doesn't imply to me that we're labelling a namespace. But then again.. Thoughts? Who mentioned this use of "default"? Whatever is decided, would hope that these things nest. i.e., assuming we use "default" on its own: default ABC { default XYZ { struct foo { static int bar; }; }; }; int ABC::XYZ::foo::bar = 23; Of course, unlike everything else, this proposal will require changes to the linker. Will this make it less acceptable to the ANSI committee? Can anyone think of a way to do this sans linker changes? I can't. Reid -- Reid Ellis rae@utcs.toronto.edu || rae@alias.com CDA0610@applelink.apple.com || +1 416 362 9181 [work]