3 ms·
I'd go as far as saying that (Obj)C blocks feel right at home in pure C (where I actually used them more than in ObjC) whereas C++ lambdas fit in, well... C++.
by lloeki 15y ago
I'd go as far as saying that (Obj)C blocks feel right at home in pure C (where I actually used them more than in ObjC) whereas C++ lambdas fit in, well... C++.
I just wish the actual passive-aggressive fight between the FSF and Apple would resolve and blocks could finally make it into upstream GCC C compiler.
- ben_straub 15y agoNot likely. Apple's moved to a clang-based toolchain, haven't they?
- lloeki 15y agoThey're still transitioning from pure gcc first to llvm-gcc then to llvm+clang, and blocks are available in all of them. XCode 3.2 defaults to GCC 4.2 with LLVM optionally available and IIRC XCode 4 too (can't check as I downgraded for various reasons). The blocks patchset against pure GCC exists, and the problem mostly lies in upstream GCC refusing patches whose copyright has not been assigned/transferred to the FSF (see https://lwn.net/Articles/405417/ https://lwn.net/Articles/405417/). The rationale is that a critical component such as GCC should not be at the mercy of multiple (possibly hundreds) conflicting parties and easing a possible relicense process to ensure its protection. While I understand the rationale behind this, my opinion is that it feels bureaucratic to the point of hampering notable innovative contributions while favoring local forks which will inevitably end up dying, as maintaining a fork (whatever the patchset size) against the march of a behemoth like GCC is essentially hopeless.
- Zev 15y agoXCode 3.2 defaults to GCC 4.2 with LLVM optionally available and IIRC XCode 4 too (can't check as I downgraded for various reasons). Xcode 4 defaults to llvm-gcc, not gcc-4.2.
- lloeki 15y agoI wasn't quite sure about my memory of it when I wrote it, thanks for the correction. That's still not clang though.
- calloc 15y agoThere is no-one at Apple that can sign the copyright for the blocks code over to the FSF and as such it will never happen. At least that was told on the mailing list for LLVM/Clang. I understand why the FSF wants copyright assignment, but it makes the process a lot longer and more complicated.
- lloeki 15y agoProbably Jobs can?