• 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: Ken Thomases <email@hidden>
  • Date: Wed, 04 Jul 2012 08:57:08 -0500

On Jul 4, 2012, at 7:45 AM, Roland King wrote:

> I sort of understand the explanation by Ken Thomas, although I never really gelled with the C function pointer syntax and always had to look that up.

Well, my suggestion was actually to think in terms of just C function syntax, not function pointer syntax, precisely so it would be something familiar and (pardon the pun) routine.

Of course, it doesn't help that I also got the position of the return type when defining a block object wrong.

> Not sure whether that last little wrinkle, the ^ before the return type when you declare one, is easily explained by anything.

I'm guessing it's necessary to make it parseable by the compiler.  Having a type name come first where an expression is required would be ambiguous and hard to parse.  Having the ^ come first presumably resolves the ambiguity.

Regards,
Ken


_______________________________________________

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

References: 
 >Stupid block syntax! (From: Graham Cox <email@hidden>)
 >Re: Stupid block syntax! (From: Roland King <email@hidden>)
 >Re: Stupid block syntax! (From: Graham Cox <email@hidden>)
 >Re: Stupid block syntax! (From: Roland King <email@hidden>)

  • Prev by Date: Crash in System Prefs when installing PrefPane
  • Next by Date: Property inheritance
  • Previous by thread: Re: Stupid block syntax!
  • Next by thread: Re: Stupid block syntax!
  • Index(es):
    • Date
    • Thread