variadic parameters marked as inout

Hi there,

i have a short question:

Why can’t variadic parameters be marked as inout ?

Thanks in advance
jaydee
Answered by OOPer in 669599022

Why can’t variadic parameters be marked as inout ?

Variadic parameter in Swift is sort of passing an Array literal to a parameter of Array type, and an Array literal cannot be modified.
Thus, inout does not make sense.
Accepted Answer

Why can’t variadic parameters be marked as inout ?

Variadic parameter in Swift is sort of passing an Array literal to a parameter of Array type, and an Array literal cannot be modified.
Thus, inout does not make sense.
Okay understood, thanks for your answer!

Regards,
jaydee
variadic parameters marked as inout
 
 
Q