14 points · by itistricky · 5y ago · 7 comments
Yet I see job ads requiring and even classes teaching Design Pattterns with Golang. And by inquiry I see that they're not talking about Golang-specific DPs (that would make sense) but about fitting traditional OO DPs (and principles like SOLID) to Golang. Which in turn seems to me like bending the language to something it was not designed for in order to fit into models we developed for traditional OO languages like java and C++.
Unsure what is going on here and what the consensus on best practice is (if any).
If you're focusing too much on specific patterns, you might be wasting your time. For example, the O in SOLID is really only relevant for inheritance which Go doesn't have. And even when a concept is relevant to Go, it's questionable how much benefit there is to think about it explicitly. Unless you want to write books and blogposts of course.
In Go, interfaces are an OO feature that allows polymorphism.
Design patterns in general are classic ways to solve common design problems and they can also be applied in many languages.
Yup; definitely a pattern.