3 ms·
Personal opinion, but I would rather be given a way to explicitly define(or in that case "undefined") the lifetime, rather than having the compiler trying to be
by kinkdr 10y ago
Personal opinion, but I would rather be given a way to explicitly define(or in that case "undefined") the lifetime, rather than having the compiler trying to be smart. I.e
let slice = ...
capitalize(slice);
"unlet" slice // <- explicitly make it go out of scope
- kinkdr 10y agoOr if you don't want to introduce a new keyword just use "let slice", which shadows the first "slice", and hence making it go out of scope.