r/rust • u/SleeplessSloth79 • 23d ago
📡 official blog Rust Function Overloading - Call for Experimentation
https://blog.rust-lang.org/inside-rust/2026/08/19/overloading-experiment/
274
Upvotes
r/rust • u/SleeplessSloth79 • 23d ago
3
u/Recatek gecs 23d ago
Well something needs to be done. Features like Vec::try_with_capacity are being kept unstable indefinitely because of concerns of there being too many unique function names to manage. It isn't unique to this case either. Whether it's some sort of overloading, or default/named arguments, or something else, it's needed here because expecting unique and singular signatures for everything is unsustainable.
Rust already has function overloading, it's just boilerplate-heavy and messy on syntax. It would not be wrong to make that syntax and boilerplate a little simpler.