Prototype of Ownership/Borrowing System for D

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Wed Nov 20 20:24:37 UTC 2019


On Wednesday, 20 November 2019 at 19:14:52 UTC, Jab wrote:
> new feature with the same problem as those before it. I don't 
> see why this can't just be attached to @safe, if this is a 
> feature to prevent memory corruption. That's exactly what @safe 
> is for. If your porting C code you aren't going to be using 
> @safe anyways. Just as you wouldn't be using @live either as 
> you'd effectively have to completely rewrite your code.

Yes, something like "@live" does not really work unless it is a 
default you occasionally try to escape from. So it seems like it 
would be better to have "@nolive" instead of "@live", but maybe I 
don't understand what it is meant to enable yet.

I think @nogc is different, though, you should never be able to 
escape from that.  @nogc is there so that you can ship 
executables with a bare bones runtime.  It is basically available 
so that both GC and non-GC programs can share libraries, IMO.




More information about the Digitalmars-d mailing list