[cfe-dev] blocks and lambdas

James Gregurich bayoubengal at mac.com
Thu Feb 10 12:44:44 PST 2011


On Feb 10, 2011, at 12:35 PM, Bruno Santos wrote:

> 
> The problem is the "set of captured items". If a lambda does not capture
> any items it can be used as a function pointer, I don't think you can do
> that with a block since it carries baggage with it even if you don't
> capture items. It would also violate one of the fundamental design
> philosophies behind C++: "you don't pay for what you don't use".
> 


fair enough. but, you can still provide for automatic conversion in cases where one wants to feed a lambda to libdispatch or some some cocoa/foundation class. As I said earlier in this thread...if you can make that happen, I'll be happy.

The goal that I'm lobbying for is to allow 3rd party mac developers to keep as much of their code in standard syntax and built upon standard libs as possible. Not only does it make the lives of existing mac developers easier, but it lowers the barrier to developers from other platforms to come to the mac.





More information about the cfe-dev mailing list