> On Jan 27, 2017, at 4:25 PM, Slava Pestov <[email protected]> wrote:
> 
> 
>> On Jan 27, 2017, at 11:44 AM, Karl Wagner via swift-evolution 
>> <[email protected] <mailto:[email protected]>> wrote:
>> 
> 
> 
>> as would CollectionOfOne<T>, to be replaced by a single-element tuple (T).
> 
> For what it’s worth, Swift doesn’t have single-element tuples. (T) is just 
> sugar for the type T itself.

You could use “(repeat T for 1)” if you really wanted. (I wonder if I should 
allow “(…, repeat T for 0)” to define trailing array segments.)

My concept always had the array directive within a “()”. One, the isolation 
(hopefully) prevents “repeat” and/or “for” from being parsed for their 
statement meanings. Two, I think “repeat repeat T for N for M” looks awful 
compared to “(…, repeat (repeat T for N) for M,… )”.

— 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com 

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to