On Borrow Checking
Nick Treleaven
nick at geany.org
Sun May 11 11:44:24 UTC 2025
On Saturday, 10 May 2025 at 21:20:11 UTC, Walter Bright wrote:
> 1. `scope` is not part of the type. It is a storage class, not
> a type modifier. The only type modifiers are immutable, const,
> shared and inout. Those are pervasively handled throughout the
> compiler's dealings with types. Making a new pointer type would
> be a huge effort *in addition* to all the other work needed to
> make a borrow checker.
What if `@live` was a storage class? Then it might be easier to
integrate with other code, and potentially help to provide some
memory-safety guarantees. The compiler's understanding of unique
expressions* might help too.
[*] https://dlang.org/spec/const3.html#unique-expressions
More information about the Digitalmars-d
mailing list