|
|
|
|
|
by int_19h
411 days ago
|
|
They aren't even necessarily redundant. If you have argument names as part of the function name, they can be overloaded on - and this is much more readable than type-based overloading because it's all explicit. Swift uses this to great effect, e.g. here are some different ways to construct a string: String(repeating: "foo", count: 42);
String(cString: zeroTerminatedBuffer);
String(42, radix: 16);
String(contentsOfFile: "foo.txt", encoding: .utf8);
|
|