Accessing class with module name as Java's

tcak via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jan 13 02:58:27 PST 2015


>
> Ah, I just re-read your OP. Your already at this point :)

Since everybody has understood the problem, and nobody could have 
come up with a solution yet, my idea is that:

HttpSocketConnectionRequest.d
=====================================
module net.http.HttpSocketConnectionRequest;

module class HttpSocketConnectionRequest{}


If compiler allowed "module" keyword to be used as an attribute 
for ONLY ONE class or struct definition in the module as above, 
module's name could be used as you were to be pointing to class 
directly.

This would let us (and Phobos developers) to be able to separate 
code files into multiple files much easily, and solve my problem 
as well :).


More information about the Digitalmars-d-learn mailing list