r/coding • u/priyankchheda15 • 5d ago
Understanding the State Design Pattern in Go: A Practical Guide
https://medium.com/@priyankchheda/understanding-the-state-design-pattern-in-go-a-practical-guide-79913bda9b02
0
Upvotes
4
u/jacobb11 5d ago
Splitting the switch statement up over several different state classes does not actually improve the code.
In a distributed system, different processes may see different state for the same object. Handling that is an interesting problem this design pattern does not help with at all.
0
u/AvidCoco 5d ago
We’re still doing design patterns in 2026?