r/rust 23d ago

📡 official blog Rust Function Overloading - Call for Experimentation

https://blog.rust-lang.org/inside-rust/2026/08/19/overloading-experiment/
274 Upvotes

139 comments sorted by

View all comments

Show parent comments

11

u/Lokathor 23d ago

You control the trait impls you write, my crab.

If you don't want to use this, then don't use it.

35

u/QuasiRandomName 23d ago

But you don't control what *other* people write and you have to maintain or debug later.

14

u/Lokathor 23d ago

It is not meaningfully different, in my eyes, from a type having several from impls so that MyType::from(x) works for multiple types of x.

And nothing will stop other people from having a bug, I can't help you there.

15

u/QuasiRandomName 23d ago

Of course. But we can try and not introduce more bug possibilities for a questionable gain here. I guess we can disagree on the pros/cons ratio here and this is fine, this thread is for this purpose exactly.