2 ms·
> Generic: Works with any type implementing the Event interface. Isn’t this the opposite? Generic is usually implying any type would do.
by DmitryOlshansky 1y ago
> Generic: Works with any type implementing the Event interface.
Isn’t this the opposite? Generic is usually implying any type would do.
- mexicocitinluez 1y agoYou can constrain a generic, so no. Generics don't mean "any type", they mean "type argument". As such, you can say "only type arguments that implement X" or similar.