DEV Community

Discussion on: GoF Design patterns that still make sense in Go

Collapse
 
shogg profile image
shogg • Edited

I don't like the observer pattern implemented with channels. The pattern is not about threads or asynchronicity. It's Sub-Pub, register for an event, receive the event. The event-sender doesn't care about who is interested in his events, that's the main point.

On another note: for me Go channels and Go maps in public APIs are code smells, anti patterns. I only use them in implementations.