Why does D not have generics?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Tue Jan 12 17:17:40 UTC 2021


On Tuesday, 12 January 2021 at 17:16:19 UTC, Paul Backus wrote:
> C++ concepts, as far as I'm aware, don't cause templates to be 
> checked for conformance prior to instantiation--which is what's 
> being asked for here. For that, you'd need something more like 
> Rust's traits.

Not sure what you mean? C++ use SFINAE. If it fails it will look 
elsewhere.




More information about the Digitalmars-d mailing list