Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You're just not looking at the problem objectively...

Seriously, though, is there a reason the Objective C blocks wouldn't work in C, just substituting functions for methods?



The blocks are already supported in plain C mode as long as you enable the Clang extension. You just use, for example, block_Copy(aBlock) instead of [aBlock copy]. Apple framed it as a C feature in its proposal for standardization (because Objective-C doesn't have a real standard AFAIK).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: