Recently, I discovered that in Swift, it is possible to use more than one variadic argument in a function. Interestingly, this capability wasn't present initially; it was introduced through the SE-0284 proposal.
I am curious about possible use cases where it is meaningful to use two or more varargs instead of passing at least one of them as an array, for example.
I attempted to search through various real codebases from different projects but found nothing, despite this feature being available for at least three years.
I've reviewed the arguments for this feature presented in the initial proposal. However, I found only two, and the first one seems rather artificial to me.
Hence, I'm curious if there are any other examples or instances where this feature has proven particularly useful or efficient?"
I'm not sure how the second option can be useful to pass at least one Int value, especially since I completely don't understand the use of the second variadic here. You will still need to specify it (..., w: 1, 2, 3, ...)) in the calling code.
This isn't the best regex in the world and GitHub isn't all encompassing but it seems to be something not used much. At least the feature is complete enough to allow that kind of API design if one desires