2 ms·
I'm not familiar with Rust, but this seems pretty similar to how C# handles generics. Am I misunderstanding?
by deafpolygon 4y ago
I'm not familiar with Rust, but this seems pretty similar to how C# handles generics. Am I misunderstanding?
- Smaug123 4y agoC# does already allow you to create interfaces whose methods are generic, yes. The way they are implemented is entirely different: Rust monomorphises all generically-typed functions (I believe this remains true for GATs), whereas the CLR monomorphises only struct-generics (and it uses the JIT to do so, unless you're using the fairly new AOT compilation).