Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!ucselx!petunia!kestrel.edu!gyro From: gyro@kestrel.edu (Scott Layson Burson) Newsgroups: comp.std.c++ Subject: Re: "module" facility for top-level namespace control Message-ID: <1991Apr30.202357.13791@kestrel.edu> Date: 30 Apr 91 20:23:57 GMT References: <1991Apr25.060721.12694@alias.com> <1991Apr29.174033.29627@alias.com> Distribution: comp.std.c++ Organization: Kestrel Institute, Palo Alto, CA Lines: 24 In article <1991Apr29.174033.29627@alias.com> rae@alias.com (Reid Ellis) writes: >Why don't we simply use a syntax which already evokes this concept -- >using "extern"? > >I don't know if another keyword after the extern is necessary, or >simply the name of the enclosing scope. Something like the following? > >extern NIH { >#include >}; My first reaction was Hey, this is pretty good, but look what it would mean: the rule would have to be that *if* the name following `extern' were not defined as a type, which is what would normally appear in that position, *then* treat it as a namespace. Then someone who misspelled a type name following `extern' wouldn't find out about it until link time, and rather indirectly at that. Besides, the namespace construct *doesn't* mean that the stuff between the braces is `extern'. So I would still prefer the keyword `namespace'. -- Scott Gyro@Reasoning.COM