Hacker News new | ask | show | jobs
by DmitryOlshansky 358 days ago
> Generic: Works with any type implementing the Event interface.

Isn’t this the opposite? Generic is usually implying any type would do.

1 comments

You 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.