News for hackers. Stuff that matters.
Re:Async.h – asynchronous, stackless subroutines in C by shakna on Saturday September 21, 2019 @06:46AM (#21034562)
> It also gives you blocks/closure support in C (needs Clang).

You get block statements just with Clang don't you? No need for libdispatch?

And you can kinda get blocks with GCC as well using a similar construct. (For the love of all that is holy, don't actually use this macro).

      #define lambda(ret_type, _body) ({ ret_type _ _body _; })
I don't quite remember, but from when I was working things out, this worked _most_ of the time for both GCC and clang.

There are no comments on this comment yet.