9 ms·
I don't see how function pointers allow inline or anonymous functions. They point to already-defined functions, which can't be defined inline or anonymously.
by chc 15y ago
I don't see how function pointers allow inline or anonymous functions. They point to already-defined functions, which can't be defined inline or anonymously.
- Jach 15y agoGuess you missed this: http://news.ycombinator.com/item?id=2718252 http://news.ycombinator.com/item?id=2718252
- chc 15y agoThat's not really C, nor is it a property of function pointers in that example — it's a nonstandard GCC feature that happens to be returning a function pointer in that particular instance. If you know of a way to do it without requiring a non-C feature like expression blocks, I'm all ears.