Remix.run Logo
▲ aw1621107 9 hours ago

I'm not super familiar with Lua so just to make sure I'm understanding you correctly are you referring to to-be-closed variables?

If so, I think the difference is that in C++/Rust RAII is the default and is quite pervasive as a result. To-be-closed variables seem like IDisposable in C# or try-with-resources in Java in that they allow the programmer to use RAII-like semantics but are opt-in.

▲binary132 7 hours ago | parent [-]

yes, just like in Rust, where Drop and constructors are optional idioms.