Sujet : Re: Opinions on `defer`?
De : chris.m.thomasson.1 (at) *nospam* gmail.com (Chris M. Thomasson)
Groupes : comp.lang.cDate : 08. Jan 2025, 23:39:07
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vlmuqc$30294$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 1/7/2025 10:17 AM, Bonita Montero wrote:
Am 07.01.2025 um 01:35 schrieb Alexis:
>
Hi all,
>
"Modern C" author Jens Gustedt has been posting on his blog about a
proposed `defer` feature (as provided by e.g. Zig and Go), the most
recent being:
https://gustedt.wordpress.com/2025/01/06/simple-defer-ready-to-use/
What do people here think about having such a feature in C?
That doesn’t save this hopelessly outdated programming language either.
When I dont't have a RAII-class for a special purpose in C++ I use my
class invoke_on_destruct:
[...]
Reminds me of ScopeGuard. ;^)