Phobos is now compiled with -preview=dip1000

Jonathan M Davis newsgroup.d at
Fri May 17 18:45:12 UTC 2019

On Friday, May 17, 2019 11:25:40 AM MDT Meta via Digitalmars-d-announce 
> I don't want to *restrict* the lifetime of a heap allocation. I
> want the compiler to recognize that the lifetime of my original
> data is the same as the processed output, and thus allow my code
> to compile.

It is my understanding that DIP 1000 really doesn't track lifetimes at all.
It just ensures that no references to the data escape. So, you can't do
something like take a scope variable and put any references to it or what it
refers to in a container. Honestly, from what I've seen, what you can
ultimately do with scope is pretty limited. It definitely helps in simple
cases, but it quickly gets to the point that it's unable to be used in more
complex cases - at least not without casting and needing to use @trusted.
So, it's an improvement for some kinds of code, but I suspect that in
general, it's just going to be more annoying than it's worth. Time will tell

- Jonathan M Davis

More information about the Digitalmars-d-announce mailing list