The text, with examples, is here.[1] Read that, skip the audio.<p>About operators, he writes "So, to grab one of those earlier examples: when you write a + b, that's equivalent to calling a.add(b) or b.add(a) or even Add::add(a, b). The operator is special syntactical sugar for the trait." But <i>which one</i> of those?<p>This matters, because it leads to mixed-mode semantics trouble. Who determines the output type of "a + b"? "a"? "b"? Both? Are there implicit type conversions? This is where C++ gets into strange interactions between type converters and generic selection. C++ resolves this with a rule that, when there are multiple possible instantiations, the selected one must be one notch "better" than the alternatives.<p>Python gets into mixed-mode trouble with numpy arrays vs. built-in lists. In Python,
"[2,4] * 2" is [2,4,2,4], while "array(2,4) * 2" is [4,8].<p>It's a classic problem in language design. If there are no implicit conversions, users complain about having to write "1.0" instead of "1", or worse, having to write "1.0L".
If there are too many implicit conversions, you get unexpected semantics. Basically, conversions are there for numbers. Then somebody decides to generalize them. That sometimes ends badly.<p>There's nothing here about what Rust does about conversions, but that may be covered in one of the other many parts of this series.<p>The good news is that the Rust programming book is finally coming out in just 6 more days. So there's something better to read than this.<p>[1] <a href="https://newrustacean.com/show_notes/e024/struct.script" rel="nofollow">https://newrustacean.com/show_notes/e024/struct.script</a>