• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Stupid block syntax!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Stupid block syntax!
      • From: Vincent Habchi <email@hidden>
References: 
 >Stupid block syntax! (From: Graham Cox <email@hidden>)
 >Re: Stupid block syntax! (From: Quincey Morris <email@hidden>)
 >Re: Stupid block syntax! (From: Dave <email@hidden>)
 >Re: Stupid block syntax! (From: Charles Srstka <email@hidden>)
 >Re: Stupid block syntax! (From: Graham Cox <email@hidden>)
 >Re: Stupid block syntax! (From: Sean McBride <email@hidden>)

  • Prev by Date: Re: Crash when calling va_arg()
  • Next by Date: Re: Dynamic modification of text search results
  • Previous by thread: Re: Stupid block syntax!
  • Next by thread: Re: Stupid block syntax!
  • Index(es):
    • Date
    • Thread