DIP10005: Dependency-Carrying Declarations is now available for community feedback

Dominikus Dittes Scherkl via Digitalmars-d digitalmars-d at puremagic.com
Mon Jan 2 23:19:41 PST 2017


On Monday, 2 January 2017 at 21:23:19 UTC, Andrei Alexandrescu 
wrote:
> DIP1005 gives consideration to the speed of compilation aspect 
> in larger proportion than speed's importance; the first and 
> foremost benefit of DIP1005 is it closes the gap on dependency 
> encapsulation, which had been very successfully narrowed by 
> local imports.
I love that idea. But I still can't see why this requires any new 
syntax. Simply extending the scope of local inports to include 
the function header is enough.
Only for .di-generation it may be useful to move all local 
imports to the declaration (maybe with this new syntax "with" 
before it) - but that should be done with ALL local imports, 
because today the .di-files are incomplete and will stay so if 
the new syntax is introduced but "old-style" local imports still 
valid and not exported to the .di.
Or the old local imports become deprecated together with the 
introduction of the new "with" syntax and vanish soon after that.


More information about the Digitalmars-d mailing list