3 ms·
C# ref types also have a form of borrow checker that ensures that they never outlive whatever they point to. It's a more simplified version than Rust because li
by int_19h 1y ago
C# ref types also have a form of borrow checker that ensures that they never outlive whatever they point to. It's a more simplified version than Rust because lifetimes are always inferred.
- whizzter 1y agoYeah, ran into one of those rules the other week. Was kinda annoying since it was a very theoretical issue compared to the real case I had that was completely safe.
- neonsunset 1y ago[dead]
- int_19h 1y ago`unsafe` exists for stuff like that, although I'm not so sure that such tricks are GC-safe.
- whizzter 1y agoIn that case I was able to work around it and still remain in the safe context. I'm not too phased at going for unsafe in general, but prefer to keep it within focused submodules that really need it though and doesn't leak unsafe details.