News for hackers. Stuff that matters.
Re:The Cost of a Closure in C by __phantomderp on Saturday December 13, 2025 @11:29AM (#46255737)
For what it's worth, that is the primary feature of the proposal linked in the blog post. It's just not talked about in the post because that post is about... performance!

https://thephd.dev/_vendor/future_cxx/papers/C%20-%20Functio...

Re:The Cost of a Closure in C by sirwhinesalot on Monday December 15, 2025 @04:52AM (#46272369)
That actually goes a bit further than my suggestion, since it allows the closure to be returned with its unique type. I'm not a fan of introducing these "unnamable types" to C since it means the closure producing function cannot be declared in a header.

I do like the trampoline trick in 3.2.4, however, neat alternative to a fat pointer!