3 ms·
> Microsoft could have added some unified Unit type but they did not, which makes this irrelevant. It's not irrelevant - you're using Task/Task<T> as an exampl
by lkitching 9y ago
> Microsoft could have added some unified Unit type but they did not, which makes this irrelevant.
It's not irrelevant - you're using Task/Task<T> as an example of the non-generic base type/generic subtype pattern being necessary, but it isn't.
IEnumerable<T> extending IEnumerable is a consequence of C#1 not supporting generics at all, and the non-generic version would not be necessary if it had. I was just using it as a common example of the boilerplate the pattern incurs.
- ludston 9y agoNo, I was using IValidator, IValidator<t> as an example of a non generic base type being necessary when interfacing with existing libraries... Honestly if you can that clojure library I linked a few posts ago without using this technique I will be extremeley impressed, but otherwise I disbelieve you. (Note: I have done this a few years ago.)