3 ms·
C# does already allow you to create interfaces whose methods are generic, yes. The way they are implemented is entirely different: Rust monomorphises all generi
by Smaug123 4y ago
C# 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).