[swift-evolution] named parameters
    Chris Lattner 
    clattner at apple.com
       
    Fri Jan 22 18:37:58 CST 2016
    
    
  
> On Jan 22, 2016, at 4:31 PM, Erica Sadun <erica at ericasadun.com> wrote:
> 
>> 
>> Alternatively, the argument could be made that we should just remove this splatting behavior.  I haven’t heard of any super-compelling use-cases for it.  Adding a sigil for this operation would expose the complexity that the behavior underlines.
>> 
> 
> Use case:
> 
> Zipping streams of arguments into tuples and then applying them through a function, and for the sake of argument, there's a big scary monster of necessity preventing you from consuming them at the same time using f($0, $1, $2, etc), so the lazy zipped tuple stream occurs at a different time/place as the consumption, which is not expecting a tuple input but n separate arguments.
AFAICT, the difference is between:
	f(*$0)
and:
	f($0.0, $0.1)
I could argue very easily that the later is much more clear than the former.  High arity tuples are also very uncommon.
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160122/96936c4c/attachment.html>
    
    
More information about the swift-evolution
mailing list