4 ms·
tl;dr: export one type per package to avoid shadowing of package names. Can't help but quote: "Design patterns are bug reports filed against the language" (Pet
by nine_k 9y ago
tl;dr: export one type per package to avoid shadowing of package names.
Can't help but quote: "Design patterns are bug reports filed against the language" (Peter Norvig, iirc).
- dullgiulio 9y agoNot really, not in this case. The author of the article should take some time to learn idiomatic Go. "[...] I can use packages as metaphore for classes" is a big red-flag that one doesn't have the fundamentals. When one writes Go, writes in Go. Not in Ruby, not in Lisp, not in Haskell. In Go.
- dozzie 9y agoYou don't understand. Good programmer can write in Fortran in any language.