D import idiom compilation time

JN 666total at wp.pl
Tue Jan 8 13:39:48 UTC 2019


On Monday, 7 January 2019 at 21:50:20 UTC, Andrei Alexandrescu 
wrote:
> This is pretty awesome.
>
> Since the implementation would (initially at least) be private, 
> the presence of "from" in documentation would be awkward. So I 
> suggest the glorious hack:

I am probably in minority here, or I am misunderstand the purpose 
of this feature, but wouldn't such stuff be better put somewhere 
around the compiler/frontend rather than in the library with 
compile-time magic?

Maybe I am wrong, but if I were a complete outsider to D and saw 
this kind of mixin magic, I'd be definitely concerned. I wouldn't 
see it as "glorious hack", instead I'd view it as "wow, D is so 
bad, look how many tricks they do just to import std lib" :S


More information about the Digitalmars-d mailing list