https://issues.dlang.org/show_bug.cgi?id=13605

--- Comment #5 from Mike <[email protected]> ---
(In reply to Ketmar Dark from comment #3)
> (In reply to Mike from comment #2)
> > (In reply to Ketmar Dark from comment #1)
> > > what to do with this code:
> > > 
> > >   version(Posix) module mod;
> > >   int n;
> > > 
> > > should it be rejected, should compiler build default module name (as it 
> > > does
> > > now), or something else?
> > 
> > What does the compiler do now if the module declaration is missing?  This
> > enhancement shouldn't change anything.
> ah, and here we got incinsistency!
> 
> the logic and common sense tells me that `version(Posix) module mod;` should
> omit the whole module on on-posix systems. 

Programmers who understand the grammar of the language will have no problem
here.  There's no reason to think modules declarations are special, and
therefore no inconsistency or ambiguity.

--

Reply via email to