4 ms·
I made a similar comment on the reddit post. This seems like something handled better by interfaces. In my experience, whenever I end up writing a large type s
by pbnjay 10y ago
I made a similar comment on the reddit post. This seems like something handled better by interfaces.
In my experience, whenever I end up writing a large type switch on an interface I take it as a code smell. All those cases should be an interface method. Only in rare instances (base case serialization of builtin types for example) would I really think type switches make sense.