Why does D not have generics?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Fri Jan 15 18:14:22 UTC 2021


On Friday, 15 January 2021 at 18:11:04 UTC, Bruce Carneal wrote:
> Type erasure can be tricky, even when it is restricted to basic 
> value types of the same size.  This shows up when implementing 
> radix sort where one solution is to map to/from whole numbers 
> (NaN semantics being ignored).

Yes, I think maybe it can work if one cannot retrieve the key. 
Then one can store it in a coded fashion that sorts correctly as 
byte sequences?



More information about the Digitalmars-d mailing list