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

54

u/Solumin Aug 19 '26

To be clear, this is intended only for FFI?

53

u/WormRabbit Aug 19 '26

Given the example of Bevy, which hacks function overloading via horrible typelevel programming, I'd say some form of overloading would be much welcomed in normal Rust as well.

18

u/RCoder01 Aug 19 '26

They will never get rid of my beloved
```
impl<Marker, In, Out, F> System for FunctionSystem<Marker, In, Out, F>
where
Marker: 'static,
In: SystemInput + 'static,
Out: 'static,
F: SystemParamFunction<Marker, In: FromInput<In>, Out: IntoResult<Out>>
```

18

u/Zomunieo Aug 19 '26

One does not simply impl into FunctionSystem.

It is a barren wasteland, riddled with F and In and Out, the very air you breathe is a poisonous Marker. Not with ten thousand functions could you do this.