Contradictory justification for status quo
via Digitalmars-d
digitalmars-d at puremagic.com
Sat Feb 28 08:24:01 PST 2015
On Saturday, 28 February 2015 at 10:40:32 UTC, bearophile wrote:
> Andrei Alexandrescu:
>
>> I'm following with interest the discussion "My Reference
>> Safety System (DIP???)". Right now it looks like a lot of work
>> - a long opener, subsequent refinements, good discussion. It
>> also seems just that - there's work but there's no edge to it
>> yet; right now a DIP along those ideas is more likely to be
>> rejected than approved. But I certainly hope something good
>> will come out of it.
>
> The second scope proposal looks simpler than the first:
> http://wiki.dlang.org/User:Schuetzm/scope2
>
Still working on it, but I think we're on the right track. Zach
had some really good ideas.
> Later in Rust they have added some lifetime inference to reduce
> the annotation burden in many cases.
I just modified Walter's RCArray to work with the new proposal.
It looks almost identical, but now supports safe slicing. (It
currently lacks a way to actually get an RCArray of a slice, but
that can be added as an `alias this`). There's only one `scope`
annotation in the entire code. Even though the proposal includes
a `return` annotation, it's not needed in this case.
In general, if it works out like I imagine, there will be almost
no annotations. They will only ever be necessary for function
signatures, and then only in `@system` code, `extern`/`export`
declarations, and occasionally for `@safe` functions. Everything
else will just work. (@safe will become slightly stricter, but
that's a good thing.)
More information about the Digitalmars-d
mailing list