3 ms·
> a feature like ownership and borrowing can't be bolted on afterward D has a prototype ownership/borrowing system implemented.
by WalterBright 4y ago
> a feature like ownership and borrowing can't be bolted on afterward
D has a prototype ownership/borrowing system implemented.
- habitue 4y agoThat is very cool. I kinda tossed out the comment that it can't be bolted on, but maybe I'm wrong? My guess would be it's like a gradual type system in python etc where older D code is the equivalent of unsafe?
- WalterBright 4y agoI, too, thought it couldn't be done. But it can. All that's needed is to annotate a function with @live, which turns on OB for that function. This makes it completely compatible with existing code. The neato thing is it's not necessary to learn a new language, new syntax, throw everything you have away, etc.