[swift-evolution] Strings in Swift 4

Matt Whiteside mwhiteside.dev at gmail.com
Fri Jan 27 19:47:23 CST 2017


>> 
>>> I also prefer #1.  It’s a shame that this conflicts with the potential
>>> syntax for variadic generics.  Is there really no way around this?
>>> I’m showing my ignorance on compilers here, but couldn’t the fact that
>>> variadic generics will be inside angle brackets be used to
>>> distinguish?

> AFAIK, we have no serious / concrete design proposal for variadic generics, so it remains unclear to me that we would syntactically follow the C++ model.  The C++ model seems very influenced by its instantiation based approach.
> 
> In any case, it seems like an obviously good tradeoff to make the syntax for variadic generics more complicated if it makes one sided ranges more beautiful.
> 
> -Chris

Thanks for sharing your thoughts on this.  It’s hard to disagree with your point.

My only other thought is that there is some elegance to sharing the same syntax at compile time and runtime for the conceptually a similar operation of “give me the rest of the items in the list”.

-Matt

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


More information about the swift-evolution mailing list