DIP1000: The return of 'Extend Return Scope Semantics'
Ola Fosheim Grostad
ola.fosheim.grostad at gmail.com
Thu May 27 20:21:58 UTC 2021
On Thursday, 27 May 2021 at 20:11:37 UTC, vitoroak wrote:
> I do find it more intuitive in Rust too, and lifetime
> parameters in Rust also apply to structs so you can have a
> struct that has the same lifetime as the reference it receives,
> so you can have a Mutex for example return a LockGuard struct
> that will not outlive the Mutex.
Sounds useful. I have never used lifetimes myself, only read
about it (including some theory), but I know that lifetime
annotations predates Rust, I think it was used in a ML dialect.
So it isn't unique to Rust and I assume universities will teach
it... So, it will most likely become standard? Dunno.
More information about the Digitalmars-d
mailing list