3 ms·
> its (much more powerful than Java) generics Yeah, it's also interesting to point out how useful to FP C# 11's further improvements to generics are. Generic M
by WorldMaker 4y ago
> its (much more powerful than Java) generics
Yeah, it's also interesting to point out how useful to FP C# 11's further improvements to generics are. Generic Math, which the IMonoid<T> in this example is a part of explaining a small related piece of (static abstract interfaces), is another place where C# is improving generics (further beyond Java).
The list of interfaces in the much expanded System.Numerics namespace where most of the raw implementation of Generic Math lives should look quite interesting, if not familiar, to many FP developers: https://learn.microsoft.com/en-us/dotnet/api/system.numerics?view=net-7.0 https://learn.microsoft.com/en-us/dotnet/api/system.numerics...
It will be interesting to see where libraries take Generic Math.