Re: Stupid block syntax!
Re: Stupid block syntax!
- Subject: Re: Stupid block syntax!
- From: Greg Parker <email@hidden>
- Date: Thu, 05 Jul 2012 11:23:56 -0700
On Jul 5, 2012, at 9:40 AM, Sean McBride <email@hidden> wrote:
> On Thu, 5 Jul 2012 10:45:57 +1000, Graham Cox said:
>> I read recently that the '^' was the only possible operator that could
>> be used due to the inherent grammar of C meaning that anything else
>> would have introduced ambiguity.
>
> IIRC, the other reason was for Objective-C++. I think ^ is one of the few operators that can't be overloaded in C++.
In C and C++, ^ is a binary operator. Block objects would look like a unary ^, so there is no ambiguity.
Note that C++ allows overloading of almost everything, including binary ^, but it doesn't allow creation of new operators like unary ^.
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden