Join Nostr
2026-07-16 19:16:16 UTC
in reply to

mos_8502 :verified: on Nostr: *Eventually* we will be able to use this pattern:<code>if (auto my_foo = ...

*Eventually* we will be able to use this pattern:<code>if (auto my_foo = foo_new())<br>{<br> // my_foo is non-nullptr<br> defer {<br> foo_free(my_foo); // At the end of the enclosing scope, my_foo will be freed.<br> }<br>} else {<br> // my_foo is nullptr, handle the error;<br>}<br></code>

This will make for much cleaner code, long-term.