News for hackers. Stuff that matters.
Re:Performance Improvements in .NET 10 by feoren on Wednesday September 10, 2025 @03:11PM (#45202276)
Covariance and contravarience is very useful, but it's quite annoying that it can only be used with interfaces and not classes/structs. I write lots of little monoid-like data wrappers like Named<T>, and I have to either go through the hassle of dealing with interfaces for something that shouldn't need it, or I have to abandon covariance. The .NET maintainers seem to think that nobody wants covariance on classes, but it would be very helpful to me.

There are no comments on this comment yet.