3 ms·
> I would almost be inclined to say that Python and Rust have more differences than similarities. This is somewhat of a stretch: dyn Traits in Rust are sort of
by woadwarrior01 2y ago
> I would almost be inclined to say that Python and Rust have more differences than similarities.
This is somewhat of a stretch: dyn Traits in Rust are sort of like compile time duck typing. OTOH, interfaces in Go and virtual functions in C++ are the same thing.
- steveklabnik 2y agoIt really depends on what kind of axis you’re talking about. Under the hood, Go’s interfaces and Rust’s “dyn types” (the new nomenclature for trait objects) are the same, and C++’s virtual functions are different. (Though you can emulate them with unsafe in Rust, like anyhow)