[swift-evolution] [Pitch] Enforce argument order for defaulted parameters
cyano at me.com
Wed Mar 30 13:32:35 CDT 2016
Yes I think it would be fine to remove, as long as you can still leave out arguments you just want the default values for, of course (otherwise there wouldn’t be much use of default left). I doubt many people directly exploit this feature, although it probably happens here and there by accident. I always try to keep the same order as the signature.
> On 30 Mar 2016, at 09:59, Joe Groff via swift-evolution <swift-evolution at swift.org> wrote:
> Many people are surprised when they find out defaulted parameters can be reordered, unlike required arguments. This special case adds complexity to the language, and runs against our general trend of treating argument labels as a significant part of an API's name, and preferring a single way of writing API calls. I think it's worth revisiting this design choice—is the special case worth the complexity? How many people take advantage of default argument reordering?
> swift-evolution mailing list
> swift-evolution at swift.org
More information about the swift-evolution