Re:Tell HN: C Experts Panel – Ask us anything about C
by rseacord on Tuesday April 14, 2020 @12:01PM
(#22867578)
Yes, we have discussed adding this feature at scope level. A not entirely serious proposal was to implement it as follows:
We are also looking at the attribute cleanup. Sounds like you should be involved in developing this proposal?
[ Parent
| on HN ]
Re:Tell HN: C Experts Panel – Ask us anything about C
by a1369209993 on Wednesday April 15, 2020 @02:12AM
(#22875078)
Apropos of this, I'll toss in: please support do-after statements (and also let statements).
do foo(); _After bar();
/* exactly equivalent to (with gcc ({})s): */
({ bar(); foo(); });
#define DEFER(a, b, c) \
_Let(a) if(!b) {} else do {c;} _After
(This is in fact a entirely serious proposal, though I don't actually expect it to happen.)