#golang Pro Tip:
As of Go 1.21, there are now min and max:
min(2, 3) // 2 (int)
max(2, 3.5) // 3.5 (float64)
min("c", "b", "a") // "a" (string)
Check out the spec for details: go.dev/ref/spec#Min_and_max
To become a better Gopher, be bold and study the source code of the packages you import. Not only will you better understand how they work, but you'll also learn what patterns they use in practice.
#golang
Most OOP languages say:
'A cat IS an Animal' (inheritance) 🐈🧬
In Go, we say:
'A cat CAN make a sound' (behavior) 🐱🔊
Let's create abstractions around what things DO, not what they ARE.
Embrace the #golang way! 💪🚀
> Go 1.20 improves build speeds by up to 10%, bringing it back in line with Go 1.17.
> Go 1.18 and 1.19 saw regressions in build speed, largely due to the addition of support for generics and follow-on work.
🎉
#golang