Why modules is so strongly limited?
imbaFireFenix via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jul 15 13:49:05 PDT 2016
On Thursday, 14 July 2016 at 09:36:17 UTC, Jonathan M Davis wrote:
> Java does basically the same thing (though they take it even
> farther, since they only allow one, public class per module),
> and IIRC, a number of other languages do as well (haskell does
> from what I recall, and python might; I don't remember
Really! I don't know any people who migrate from namespace to
module/package system and don't hate this.
> If we didn't do it that way, then it would be a lot harder to
> figure out where all of the code for a given module was
Sure, more flexibility - more complicated.
But that not impossible...
Or it can be enabled or disabled by compiler pararms...
> while some folks may find it occasionally annoying, most of use
> have no problem whatosever with modules being files and
> packages being directories.
Using modules like [namespaces + include] not prohibit using 1
file == [1 class | 1 module], there is expand possibilities for
beautifuly implementation.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
For me the best way as C#:
All files in project file - including at compilation, but in code
- mount only at defined scope point (call for namespace unit or
using/import whole namespace)
Don't need file or part of module? - Exclude from project.
More information about the Digitalmars-d
mailing list