DIP10005: Dependency-Carrying Declarations is now available for community feedback
pineapple via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jan 1 16:47:41 PST 2017
On Saturday, 31 December 2016 at 17:02:55 UTC, Chris Wright wrote:
>> This extension removes an unforced limitation of the current
>> with syntax (allows it to occur at top level)
>
> In other words, another aspect of this DIP is that I can write:
>
> module foo;
> static import std.traits;
> static import bar;
> with (std.traits)
> {
> template Foo(T) if (isAbstractClass!T) {}
> }
> with (bar.SomeEnum)
> {
> enum something = SomeEnumValue;
> }
This is the only expression of the feature I've seen so far that
makes intuitive sense to me.
I'm still not sold on it being a worthy addition but, if it were,
then this is the most promising syntax I've seen so far.
More information about the Digitalmars-d
mailing list