Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Coherence 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: