Module Clarification

Steven Schveighoffer via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Sep 27 06:48:39 PDT 2016


On 9/22/16 4:16 PM, Jonathan Marler wrote:
> On Thursday, 22 September 2016 at 20:09:41 UTC, Steven Schveighoffer wrote:
>>
>> Before package.d support, you could not do any importing of packages.
>> You could only import modules. package.d was how the compiler allowed
>> importing packages.
>>
>> I don't know that there is a fundamental difference between
>> foo/package.d and foo.d, but this is just the solution that was
>> chosen. Is it a mistake? I don't think so, it's just a preference.
>>
>> Prior to this, it was common to put "package" imports into an "all.d"
>> file:
>>
>> foo/all.d // import fooPart1.d fooPart2.d
>> foo/fooPart1.d
>>
>
> Ok, do you know why is this not allowed?

I'm sure if you search the forums, you can find discussions of this. 
Walter probably had a reason. I'm not sure if the reason is valid 
anymore now that package.d is supported.

-Steve


More information about the Digitalmars-d-learn mailing list