[swift-evolution] named parameters

Thorsten Seitz tseitz42 at icloud.com
Sat Jan 23 09:17:06 CST 2016


Yes, I think Swifts external parameter labels are a really well done part of the language and a great advantage over languages without labeled parameters and over those who do have labeled parameters but where the labels are simply the parameter names which does not allow the same expressiveness in a method call as I’m used to from Smalltalk (or Objective-C). I’m really glad Swift has these.

-Thorsten


> Am 22.01.2016 um 20:46 schrieb Jordan Rose via swift-evolution <swift-evolution at swift.org>:
> 
> 
>> On Jan 22, 2016, at 7:49, Rob Mayoff via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>> 
>> On Fri, Jan 22, 2016 at 8:26 AM, Tino Heth via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>> Labels are "just" an aid for programmers, but for the program itself, they have not much more meaning than a comment:
>> 
>> UIView.insertSubview(_:,belowSubview:) and UIView.insertSubview(_:,aboveSubview:) beg to differ. As do UIView.convertPoint(_:,toView:) and UIView.convertPoint(_:,fromView:). Need more examples? Take a look at UITableViewDelegate.
> 
> Agreed. I'm quite happy that Swift labels are effectively part of the method name and therefore consistently applied. Long parameter lists are easy to get lost in.
> 
> Jordan
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160123/d631b78f/attachment.html>


More information about the swift-evolution mailing list