Re:Apple's Module proposal to replace headers for C-based la...
by matthavener on Monday November 26, 2012 @02:53PM
(#4833642)
Apple uses C++, even on mobile. The iBooks acknowledgements lists Boost and Google Protobufs.
[ Parent
| on HN ]
Re:Apple's Module proposal to replace headers for C-based la...
by masklinn on Monday November 26, 2012 @03:47PM
(#4833942)
That Apple uses C++ (you could also have mentioned LLVM) does not change their production and API being mostly C or Obj-C, and thus their proposals are usually for C. A previous examples was blocks, they created those for C and Obj-C, they can be used from C++ but are completely incompatible with C++11 lambdas as far as I know.
Re:Apple's Module proposal to replace headers for C-based la...
by comex on Monday November 26, 2012 @04:29PM
(#4834115)
You can now implicitly cast lambdas to blocks, although they're otherwise completely separate (and must be - C++'s approach wouldn't easily translate to C).
Re:Apple's Module proposal to replace headers for C-based la...
by bronxbomber92 on Monday November 26, 2012 @05:28PM
(#4834385)
They can be cast the other way, too. No?
Re:Apple's Module proposal to replace headers for C-based la...
by plorkyeran on Monday November 26, 2012 @07:10PM
(#4834757)
Casting to a C++11 lambda doesn't really make any sense; each lambda function is a unique anonymous type. There's also no need to do any casting to use an Obj-C block anywhere that you can use a C++11 lambda, since they obviously already implement the Callable concept.
Re:Apple's Module proposal to replace headers for C-based la...
by hamidr on Tuesday November 27, 2012 @01:43AM
(#4835972)
Also webkit.
Can't they just treat lambdas as types(class/struct) with operator() methods?
Re:Apple's Module proposal to replace headers for C-based la...
by huxley on Monday November 26, 2012 @04:03PM
(#4834013)
Probably in other areas, but a major one is in IO-Kit (their device driver framework) which is written in and uses a specialized subset of C++ called Embedded-C++, though the userspace API for it has a C wrapper.