Re: Stupid block syntax!
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