News for hackers. Stuff that matters.
Re:Matt Godbolt sold me on Rust by showing me C++ by int_19h on Wednesday May 07, 2025 @10:51PM (#43922634)
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);
Re:Matt Godbolt sold me on Rust by showing me C++ by bsder on Thursday May 08, 2025 @01:04AM (#43923215)
Oooh. Nice. I forgot about the Smalltalk / ObjC / Swift usage of keywords for messages.