by itistricky on 11/2/21, 8:35 AM with 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).
by jstx1 on 11/2/21, 9:56 AM
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.
by holografix on 11/2/21, 10:04 AM
by hamdouni on 11/2/21, 5:04 PM
by mytailorisrich on 11/2/21, 8:48 AM
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.
by sethammons on 11/2/21, 7:34 PM
by asguy on 11/2/21, 3:13 PM
Yup; definitely a pattern.