7 ms·
This is incorrect. Apple's C is C99; they have also introduced a new optional syntax for blocks that they have submitted for standardization.
by halostatue 17y ago
This is incorrect. Apple's C is C99; they have also introduced a new optional syntax for blocks that they have submitted for standardization.
- jrockway 17y agoRight, and $foo is just C but with $bar.
- sparky 17y agoTo be fair, all widely-used C compilers I am aware of have extensions to the C90 and C99 standards, which they accept as conformant code by default.
- jrockway 17y agoSure, and that's fine. What Apple is doing is saying, "you must use C" without actually defining what "C" is.
- wglb 17y agoThere was a hacker news discussion a while back by one of the principals of Coverity in which they asserted, with no small experience, that there is no such thing as a C language. This is due to the wide number of variations in what compilers accept and that users of C compilers expect. Sure there is an ideal, but practically, there is not consistent definition of the C language.
- sparky 17y agoThe article discussed was this one in CACM (link is to discussion on Lambda the Ultimate) http://lambda-the-ultimate.org/node/3824 http://lambda-the-ultimate.org/node/3824 . I remember seeing it on HN too, but couldn't find the page immediately.
- halostatue 17y agoWrong. Apple's C is C99 (as implemented by both gcc and clang). If you wish to take advantage of something like Grand Central Dispatch, they recommend that you do so with their completely optional syntax for blocks (which, aside from being closures AFAIK, are essentially anonymous functions in situ instead of defining a function externally). You can still use GCD without the new block syntax by using function pointers, leaving you with bog standard C99. Frankly, gcc implements a lot more non-standard stuff on its own than Apple's blocks have introduced.