Clean Up Your GOOOP: How to Break OOP Muscle Memory

April 21, 2024 34 min Free

Description

This talk addresses Gophers who transitioned from object-oriented programming (OOP) backgrounds, exploring how to unlearn OOP muscle memory and adopt idiomatic Go practices. It discusses common OOP constructs like classes, inheritance, and design patterns, and contrasts them with Go's approach using structs, embedding, and packages. The presentation highlights the pitfalls of directly translating OOP patterns into Go, leading to "goop," and offers guidance on structuring Go projects and writing maintainable code by embracing Go's unique features. Key topics include avoiding circular dependencies, defining interfaces at the consumer level, and applying principles like SOLID in a Go context.