3 ms·
> That, incidentally, is why Swift added support for positional-only parameters (though it has no concept of keyword-or-positional). Swift's syntax is a lot mo
by Razengan 7y ago
> That, incidentally, is why Swift added support for positional-only parameters (though it has no concept of keyword-or-positional).
Swift's syntax is a lot more intuitive and consistent:
function(parameterWithImplicitlyRequiredLabel: Int,
differentArgumentLabel internalParameterName: Int,
_ parameterWithoutLabel: Int,
variadicParameterWithLabel: Int...)
which you would call as
function(parameterWithImplicitlyRequiredLabel: 1, differentArgumentLabel: 2, 3, variadicParameterWithLabel: 4, 5, 6, 7)
[0] https://docs.swift.org/swift-book/LanguageGuide/Functions.html#ID166 https://docs.swift.org/swift-book/LanguageGuide/Functions.ht...