3 ms·
I still have the scars from libraries implementing implicit conversions in c++. The question is - for people reading the code at the call site, how easy is it
by novocaine 11y ago
I still have the scars from libraries implementing implicit conversions in c++.
The question is - for people reading the code at the call site, how easy is it to grep for what's actually happening?
I guess this rust trait at least hangs off the geobox class, but I think I might prefer the explicit ctor for non write-only code.
- steveklabnik 11y agoCoherence helps with this: you can only implement a trait for a type if you've defined either the trait or the type. So a third party library can't impl From<MyType> for YourType`, for example. In general, I find Rust pretty grep-able, though I'm a bit biased.