News for hackers. Stuff that matters.
Re:Anonymous functions in C by graphitemaster on Sunday June 22, 2014 @01:45AM (#7927013)
Correct, the problem is to call the function you cannot treat it as a standard function since it's pointing to a struct, the struct does contain the actual function pointer but there is an implicit `this' first argument to that function pointer which has to be that struct itself. This means you cannot use the block in an API that explicitly requires a function pointer, instead the API must specifically be aware of the block and would need to support it.
Re:Anonymous functions in C by fyolnish on Sunday June 22, 2014 @09:12AM (#7927719)
Of course, there's no way around that except to write block variants for those functions. stdlib on osx for example has block variants of most functions that take function pointers (`man qsort_b` for an example)

But if you write your program to use blocks from the start, that's not a big problem.

Re:Anonymous functions in C by mtdewcmu on Sunday June 22, 2014 @06:45AM (#7927491)
It sounds like you could say it's ObjectiveC-compatible, not ObjectiveC per se. But it's an unimportant distinction.