Workaround for DIP 1005

John Colvin via Digitalmars-d digitalmars-d at puremagic.com
Tue Feb 14 07:15:59 PST 2017


On Thursday, 9 February 2017 at 05:40:01 UTC, Jonathan M Davis 
wrote:
> with(import std.datetime)
> auto foo(SysTime st1, SysTime st2, Duration d);

There is of course the middle way: with(from!q{std.datetime})

I would love to be able to use `with` and have the language 
accept it in a wider range of places (e.g. module scope, on 
expressions), but in its current form it's a statement and 
introduces a scope, the inconsistency would be unpleasant.


More information about the Digitalmars-d mailing list