[swift-evolution] [Proposal] Variadics as Attribute
2th at gmx.de
Thu Jul 21 05:13:09 CDT 2016
> Am 20.07.2016 um 21:54 schrieb Chris Lattner <clattner at apple.com>:
> I’m sorry I’m late to this thread, but I’m personally strongly opposed to this.
May I ask a general question:
What implications does this statement have? Is it "spare yourself from unnecessary work, this will never be accepted", or "prepare yourself for a hard review"?
> The problem being solved here is so minor that I don’t see a reason to make a change.
There has been a discussion about having something like variadics-splat before (which could be solved with Haravikks idea in an elegant way), and don't you think it is strange to have a third(!) way to declare an array that merely looks like a carryover from C?
I've been quite surprised by the negative reaction, as I think "…" is very similar to the old for-loops and increment/decrement operators which have been phased out already...
> Further, the proposed syntax is so heavy weight that it will adversely affect readability of the API.
My impression is that variadics aren't that common in real-world code (at least creating custom variadic functions; and the way they are called wouldn't change), but if you consider them to be such a vital element of Swift:
Afaics, there is no fundamental drawback* if array-arguments could be delivered with variadics-syntax in general — this should make those happy who really like variadics, and would remove an odd special case from method signatures as well.
* well, there might be the obstacle of "when the hell do you loonies think we shall actually implement all those changes you ask for? There is a deadline for Swift 3, and we already had to drop ABI compatibility, so let us do our job!" ;-)
More information about the swift-evolution