How can we make it easier to experiment with the compiler?

Walter Bright newshound2 at digitalmars.com
Mon May 24 22:21:46 UTC 2021


On 5/24/2021 1:35 PM, Dukc wrote:
> On Monday, 24 May 2021 at 02:56:14 UTC, Walter Bright wrote:
>> A good rule of thumb is:
>>
>>     *** Never import a file from an uplevel directory ***
>>
>> Import sideways and down, never up.
> 
> You may want to reconsider what you just said.
> 
> Do you really insist that `std.stdio` should copy-paste the CLib headers instead 
> of importing `core.stdc.stdio`?

I knew someone would bring that up. :-) It's a good question.

`core` is a separate library in its own, independent hierarchy, it is not in the 
`std` hierarchy. It is not "up sideways and down". So it's good.

Now, if std.stdio imported core.stdc.stdio, and core.stdc.stdio imported 
std.stdio, then you've got a really bad design.


More information about the Digitalmars-d mailing list