Why does D not have generics?
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Tue Jan 12 22:48:46 UTC 2021
On Tuesday, 12 January 2021 at 22:23:51 UTC, Paul Backus wrote:
> (e.g. `pop_second!int` would not compile). In a language like
> Rust or Java with type-checked generics, the compiler would
> reject this function definition.
Maybe you want it to just bypass it to allow overloading? Then
you just test for the presence of as_StackConcept as a constraint
in the signature?
More information about the Digitalmars-d
mailing list