4 ms·
Well, if it’s a trait that the type must implement (even if by the compiler), is it really overloaded? Because isn’t it technically fn Default<T>::default(
by colejohnson66 6y ago
Well, if it’s a trait that the type must implement (even if by the compiler), is it really overloaded? Because isn’t it technically
fn Default<T>::default() -> T
? Which is polymorphism, not overloading? Idk. Maybe I’m just being pedantic?
- kibwen 6y agoRust has return type polymorphism rather than return type "overloading", but the difference only manifests for library authors; for API consumers the interface is the same either way.