Article View: comp.std.c++
Article #1072Re: "module" facility for top-level namespace control
From: Reid Ellis
Date: Fri, 03 May 1991 18:33
Date: Fri, 03 May 1991 18:33
59 lines
2069 bytes
2069 bytes
Reid Ellis (that's me) <rae@alias.com> writes:
|Why don't we simply use a syntax which already evokes this concept --
|using "extern"?
|
|extern NIH {
|#include <NIHCL.h>
|};
Scott Layson Burson <gyro@kestrel.edu> 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 <NIHCL.h>
};
Someone mentioned also using "default" by itself, comme ca:
default NIH {
#include <NIHCL.h>
};
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]
Technical Details
Message-ID:
<1991May3.183328.16900@alias.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!geac!alias!raeReferences:
<1991Apr25.060721.12694@alias.com> <RAEBURN.91Apr26165646@watch.mit.edu> <1991Apr29.174033.29627@alias.com> <1991Apr30.202357.13791@kestrel.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c++ Path: arc1-ca.pugleaf.net!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> <RAEBURN.91Apr26165646@watch.mit.edu> <1991Apr29.174033.29627@alias.com> <1991Apr30.202357.13791@kestrel.edu> Date: Fri, 3 May 91 18:33:28 GMT