[swift-evolution] [Proposal] Variadics as Attribute
Haravikk
swift-evolution at haravikk.me
Tue Jul 26 08:45:33 CDT 2016
Hate to have to bump this myself, but I'm still hoping to get more detailed feedback from those that have made negative comments to clarify or clear up any misunderstandings.
So far the main argument made against the change is that it's more complex than the problem being solved, however this seems to be levelled at a single problem when really this proposal is intended to solve two things; to unify the declaration of regular and variadic functions, and to enable a single function in variadic or array style at the call-site. In essence the latter is a side-effect of the former, as the variadic declaration would no longer be different from any other function. The (relative) complexity is also one of my favourite things as it actually opens up future possibilities too, which I've covered in the proposal.
Otherwise Chris mentioned it being heavyweight, but I'm unclear on whether this was a reference to complexity or just that's more to type in a declaration than three dots. However it's no more heavyweight than say @noescape or @autoclosure, both of which (in my experience at least) are a lot more common than variadics, yet they don't have a custom declaration syntax, but are both features with custom call-site behaviour, so similar to variadics.
I guess I'm resigned to the fact that this isn't likely to make Swift 3 now, but it can still be delivered as an additive change (by leaving the current syntax as a shorthand and deprecating it later) so I'd like to get more feedback before I make any updates to the proposal. It's not easy to gauge from the feedback so far how much of it was read, as I thought the advantages section made a good case, but then I'm not much for proposal writing so fully expect to be responsible for any misunderstandings ;)
> On 22 Jul 2016, at 12:43, Haravikk <swift-evolution at haravikk.me> wrote:
>> On 21 Jul 2016, at 23:05, Tino Heth <2th at gmx.de <mailto:2th at gmx.de>> wrote:
>>> Am 21.07.2016 um 22:11 schrieb Haravikk <swift-evolution at haravikk.me <mailto:swift-evolution at haravikk.me>>:
>>> it also opens passing of arrays to variadic functions, which seems to be fairly desired despite no proposal that I could find
>> I haven't seen a complete proposal, but I managed to remember a link to the last(?) discussion about it:
>> [Idea] Passing an Array to Variadic Functions <http://article.gmane.org/gmane.comp.lang.swift.evolution/14951>
> Oh yeah, in fact the post you linked to was in reply to one of mine arguing that variadics just be removed entirely =)
> The full thread and first post are here (if I got the link right): http://thread.gmane.org/gmane.comp.lang.swift.evolution/14807/focus=14951 <http://thread.gmane.org/gmane.comp.lang.swift.evolution/14807/focus=14951>
>
> But no proposal ever came from it, other than this one. I was going to propose removing variadics, but too many people seemed to be against that idea, even though it's by far the cleanest solution, none of the other ideas for array passing seem to have emerged though.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160726/e7f7377e/attachment.html>
More information about the swift-evolution
mailing list