DIP1000: Scoped Pointers (Discussion)
Chris Wright via Digitalmars-d
digitalmars-d at puremagic.com
Mon Aug 15 07:48:18 PDT 2016
On Mon, 15 Aug 2016 06:36:00 -0700, Walter Bright wrote:
> If the method is annotated with scope, the scope applies to the 'this'
> pointer.
Oh god, the attribute explosion is getting worse.
I think at this point the proper way to use attribute-based D features is
to write your code without them, then write a tool that will add all the
attributes to your source code that it can while not breaking anything.
Like now it's sensible to write a method:
public final void foo() scope inout @nogc nothrow @safe pure {}
I think the solution is to turn every function into a no-args template,
but then you can't use virtual methods.
More information about the Digitalmars-d
mailing list