On Saturday, January 25, 2020 at 10:04:19 AM UTC-5, Robert Engels wrote: > > Whenever I see a type switch it screams to me “use an interface and > restructure. “ >
You may be right. On the other hand, I think I've already gone far enough down the interface road to have collected most of the gains from that tactic. Interfaces are fine when you have a bunch of disparate types with similar external interfaces and are at a stage of processing where you can disregard the differences. You end up in type-switch land when the point is that they have *dissimilar* external interfaces but you have to cope anyway. Not ideal, but sometimes necessary. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/88b8c01c-b70e-41dc-a1e7-fb412b831f50%40googlegroups.com.