2 ms·
Ah, that's awesome and it makes a lot of sense, plus it's super helpful.
by oblio 6y ago
Ah, that's awesome and it makes a lot of sense, plus it's super helpful.
- masklinn 6y agoThere are other more "negative" reasons too: The language doesn't have varargs (to say nothing of type-safe generic variable-type args), so you'd have to pass in a slice of references e.g. print!(..., a, b, c) would become print(..., &[&a, &b, &c]) Which is not exactly sexy, plus all these references would have to implement a matching trait, whereas currently formatting different values can involve different traits depending on the format specifier e.g. a plain `{}` is Display but `{:?}` is Debug and `{:x}` is LowerHex. You can have a type which implements LowerHex but neither Debug nor Display if that makes sense.