[swift-evolution] [Discussion] Parameter `vector` keyword vs. triple dot prefix for variadic generics
Adrian Zubarev
adrian.zubarev at devandartist.com
Wed Nov 23 12:59:06 CST 2016
Actually no, I must correct myself here. We still need the postfix … to indicate how we want to pass the vector.
For instance:
func foo<vector(3) T>(label v: T) { … }
foo(label: (1,2,3))
func boo<vector(3) T>(label v: T…) { … }
boo(label: 1, label: 2, label: 3)
This topic is really interesting to explore. :)
--
Adrian Zubarev
Sent with Airmail
Am 23. November 2016 um 19:50:31, Adrian Zubarev (adrian.zubarev at devandartist.com) schrieb:
Vectors would fully eliminate that ugly … pre-/postfix and leave it only for ranges.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161123/4c24fa72/attachment.html>
More information about the swift-evolution
mailing list