The next iteration of scope

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Tue Mar 31 13:07:19 PDT 2015


On 3/15/2015 7:10 AM, "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm at gmx.net>" wrote:
> Here's the new version of my scope proposal:
> http://wiki.dlang.org/User:Schuetzm/scope2
>
> It's still missing real-life examples, a section on the implementation, and a
> more formal specification, as well as a discussion of backwards compatibility.
> But I thought I'd show what I have, so that it can be discussed early on.
>
> I hope it will be more digestible for Walter & Andrei. It's more or less an
> extended version of DIP25, and avoids the need for most explicit annotations.

Thanks for doing this. It is a good step forward.

Consider the code:

   struct Foo { C obj; }
   @safe void bar(C c, Foo* f) { f.obj = c; }

Under the proposal, for @safe code, this would have to be written as:

   @safe void bar(static C c, Foo* f) ...

I'm concerned this may break an astonishing amount of code.


More information about the Digitalmars-d mailing list