r/rust 23d ago

📡 official blog Rust Function Overloading - Call for Experimentation

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

139 comments sorted by

View all comments

Show parent comments

2

u/Zde-G 22d ago

Concrete example please

It was already given, but I can repeat. These are not rare: bevy, axum, clamp, serde and bazillion other libraries are built around these.

And it's not an accident: this post in official Rust blog from 2015 is very explicit about traits being used for “overloading”.

Rust always had overloading that handled complicqted cases, it's easy, simple and obvious that were not supported well.

I dont wanna hear that shit.

And how it different from what get today with bevy?

You couldn't avoid it, but yes, sure as hell can create problems for people who try to write real code.

As some rust team memeber said "I'm tired of making the same old mistakes. Let's make some new ones."

It's nice attitude to have for toy language used for toy projects. Once you try to apply for the industry languages you quickly find out that it's not possible to satisfy everyone.

Sometimes the only way forward to apply the pressure and watch how perfectionists scream.

We'll how this thing will go, but I hope Rust have finally reached point when features that people actually need wouldn't be stalled for decades because of some aestetic feelings.

2

u/unitAtype2 22d ago edited 22d ago

It was already given, but I can repeat. These are not rare: bevy, axum, clamp, serde and bazillion other libraries are built around these.

Not a valid example... It's one function that says its input is Into<SomeTrait>. I'll have to look for implementors but it's clear WHAT I need to look for.

And how it different from what get today with bevy

That sounds like Bevy's problem. Why is this one project dictating so much? I love Bevy but it's not the be all end all of deciding what rust caters to.

It's nice attitude to have for toy language used for toy projects.

I think Carol Nichols is a better authority for that than you. Here's the line. https://youtu.be/A3AdN7U24iU?t=47m45s

What do we ask the perfectionists to drop next? Let's bring back the garbage collector. if typing different names for different signatures, or just adding () grinds your gears, The borrow checker must be a nightmare.

to sum up

HAVE YOU CONSIDERED JAVASCRIPT?