DIP1000: Scoped Pointers (Discussion)
Robert burner Schadek via Digitalmars-d
digitalmars-d at puremagic.com
Thu Aug 11 02:06:50 PDT 2016
```
void foo() {
int c;
....
int* e;
e = &c; // Error, lifetime(e's view) is ∞ and is
greater than lifetime(c)
}
```
The DIP should make clear that this is wanted for a container
library.
Additionally, I miss how this DIP fits in the overall plan of
getting rid of the GC. As long as there isn't a written
masterplan how to combine those ideas I consider this DIP to be
incomplete.
I think this change is not worth it. I believe there is an
inherent trade-off for every programming language between
usability and theoretically correctness. And IMO this DIP is
pushing D way to far in the direction of theoretically
correctness. There are far more important things for the adoption
of D, like making the frontend a library, shipping with multiple
backends.
More information about the Digitalmars-d
mailing list