Re: function overloading, Rust doesn't support overloaded functions in the same manner as Java or C++, which is important to emphasize to people coming from those languages.
However, if you then show those people that this is legal Rust:
let addr1 = Ipv4Addr::from([13, 12, 11, 10]);
let addr2 = Ipv4Addr::from(218893066);
...that also runs the risk of confusing them, because this is indistinguishable from function overloading, because it basically is function overloading.
I'm not actually sure what to call this, because unlike Java-style overloading, Rust isn't ad-hoc; everything it's doing is fundamentally integrated into the type system. But unlike strict parametric polymorphism (and like Java), both of the above functions have totally distinct implementations.
However, if you then show those people that this is legal Rust:
...that also runs the risk of confusing them, because this is indistinguishable from function overloading, because it basically is function overloading.I'm not actually sure what to call this, because unlike Java-style overloading, Rust isn't ad-hoc; everything it's doing is fundamentally integrated into the type system. But unlike strict parametric polymorphism (and like Java), both of the above functions have totally distinct implementations.