Re: inference of block return type
Re: inference of block return type
- Subject: Re: inference of block return type
- From: Tony Romano <email@hidden>
- Date: Mon, 28 Jun 2010 14:56:43 -0700
The syntax that Bill posted is not in the document. I hate the
complexities in this syntax, there is no reason that I can think of to
have multiple syntax to represent this object. Even talking to the GCD
engineers at the show, they agrees it's overly complex for no apparent
good reason.
The syntax below to me seems inconsistent with the analogy the docs
claim the block syntax came from (declaring C function ptrs) or at least
I don't remember it ever using it in that form. (return type)
(^blockname) (parameters) seems sufficient imo. The whole idea was to
stick to a format that had precedence but use the new symbol ^(only
remaining operator that is not overloadable in C++) instead of *(btw,
that wasn't a block with a void return type :-).
Anyhows, I no longer think this is a cocoa question...
-Tony
On 6/28/10 2:41 PM, Michael Ash wrote:
On Mon, Jun 28, 2010 at 4:48 PM, Bill Bumgarner<email@hidden> wrote:
On Jun 28, 2010, at 1:45 PM, Michael Ash wrote:
But I was unable to find any discussion of HOW you explicitly declare
the return value of a block expression.
^<return-type> (<arg-list>) {<code>};
Sure, but is this documented in Apple's docs? The link to Blocks
Programming Topics posted by Tony Romano doesn't seem to include it,
although it alludes to its existence. That page does link to Apple's
submission to the standard committee which does show that syntax, but
it seems like the sort of thing that ought to be on apple.com too. Did
we miss it?
Mike
_______________________________________________
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
_______________________________________________
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