I'm really liking Swift 2, and after watching some of the WWDC2015 videos on 
the subject, I can't wait to use it in a real project.

But one area where it REALLY bugs me is that external parameter names are 
required. I can see their utility, particularly with regard to a set of default 
values and being able to specify just the ones you care about (I'm pretty sure 
this worked in a quick test I did).

I'm less convinced that using external parameter names in function calls 
improves readability or clarity.

But I don't understand the need to require the use of external names at the 
call site. If there's enough information available to the compiler at the call 
site to unambiguously choose a function or method to call, why must I supply 
the parameter names? Why not let the caller choose which external names to 
specify, and only emit an error when the result is ambiguous?

It's all complicated by the fact that the first parameter doesn't need to have 
an external name, but the rest default to having one, and it's the function 
definer who decides if they're required.

I'm going to write a bug about this, but it seems Swift 2 is more strict than 
than Swift 1.2 (as evidenced by the examples in the Language Guide), so I don't 
see Apple reversing course on this (even though I think it can be done with 
zero impact on existing Swift 2 code).

Thoughts?


-- 
Rick Mann
rm...@latencyzero.com



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to