Oh! I think I figured out what I'm doing wrong. The typealias doesn't
understand local names, and that makes some sense. I can just get rid of those
altogether and be find. Sorry for the noise.
----------------
One of the things I dislike the most about Swift is its insistence on "being
expressive". The docs talk about "allowing" expressivity, but should you choose
to allow it, you then require it, and Swift implicitly requires it in a lot of
places.
Here's an example in a playground, where the call to inSendRequest() angers the
compiler:
import Cocoa
typealias HTTPHeaders = [NSObject : AnyObject];
typealias ResponseTuple = (NSData?, HTTPHeaders?);
typealias SendResponseFunc = (inResp: NSData?, inRespHeaders: HTTPHeaders?)
-> ();
func
waitForSweep(inSendResponse: SendResponseFunc)
{
inSendResponse(nil, nil); // Missing argument labels
'inResp:inRespHeaders'
}
I find this "expressiveness" to be overly verbose.
Somewhere I read that setting the external name to "_" suppressed this, but I'm
not able to set external names in tuples, which is what the SendResponseFunc
typealias is.
Any way to get what I want?
TIA,
--
Rick Mann
[email protected]
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]