Is the module system in D fundamentally flawed?
z
z at gg.com
Sun Aug 17 14:19:50 PDT 2008
In Java I don't remember seeing "forward reference to XXX" compiler error just
because I 'import' some package, but why in D there are so many such stupid
message?
And a google search also find so many bugs associated with "forward reference"
http://www.google.com/search?hl=en&q=forward+reference+to++site%3Apuremagic.com&btnG=Google+Search
So I just wondering what's the fundamental difference between D module and
Java's package system?
Is the module system in D fundamentally flawed?
I think in modern languages such as Python, Java, all the imports should JUST
WORK. But obviously it's not the case in D. A compiler error like this is
just ridiculous: if the compiler can detect such "forward reference", why
can't it just "import" it? and why it need to report to the programmer, and
have to ask the programmer to manually fix it?
Anyone can give a summary, or guilelines on how to live with D's module system
to avoid some common mistakes.
Thanks.
More information about the Digitalmars-d
mailing list