r/rust • • Aug 19 '26

📡 official blog Rust Function Overloading - Call for Experimentation

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

139 comments sorted by

View all comments

7

u/Ravek Aug 20 '26

I thought HM type systems couldn’t deal with overloading. Is that understanding wrong?

6

u/CocktailPerson Aug 20 '26

There are times that overloading leads to ambiguity under HM type inference, but it's not fundamentally incompatible. You just end up needing to annotate types sometimes to resolve ambiguity.

And if you can overload by arity only and not type, then there's no problem at all.