DIP16: Transparently substitute module with package

Nick Sabalausky a at a.a
Fri Mar 30 14:39:14 PDT 2012


"Andrej Mitrovic" <andrej.mitrovich at gmail.com> wrote in message 
news:mailman.1240.1333130858.4860.digitalmars-d at puremagic.com...
>
> Still this is one of the few proposals I like. My only caveat is the
> comment: "except the file is not allowed to use the "module"
> declaration.". Wouldn't it be better if we explicitly declared a
> module as a package instead? In foo\bar\package.d:
> package foo.bar;
>
> Since the "module" declaration must be on the first line (or second
> line after shebang), you could special-case DMD to allow the package
> keyword to be used here. I know D likes to abuse a keyword for
> multiple things (hello Mr. Static!), but I think we could live with
> it.

Or maybe just require the module name ends with ".package"




More information about the Digitalmars-d mailing list