|
|
|
|
|
by kuhsaft
43 days ago
|
|
Not necessarily. You can ignore the reified generic system in the CLR and monomorphize it in the CIL output for your language. Debugging for users is usually a nightmare though due to the monomorphization. The benefit of a type-erased runtime is the interop between the languages built on the runtime. The monomorphization of CLR generics is what NativeAOT does, though it doesn't support some C# features. TypeScript is essentially C#, but with type-erasure and lacking the low-level struct & pass-by-reference features. I do think the C#/CLR struct implementation is better though. |
|