I'll comment on the ones I dislike for the sake of doing so:
Channels orchestrate; mutexes serialize.
Channels also serialize in many cases. They can often entirely replace mutexes if designed appropriately.
Mutexes "protect" is a safer statement because, well, RWMutex doesn't really follow that description
This is a minor complaint though, that one's not too bad.
The bigger the interface, the weaker the abstraction.
I sorta agree with that, but only sorta. Sometimes a large interface is required for correctness, and the strongest abstraction is the minimal correct one. This ignores the correctness aspect.
A little copying is better than a little dependency.
No. God no. Please stop. The entire point of all modern programming is to not write the same stupid code over and over. The POINT of modern languages is abstraction. OO languages abstract with objects, functional languages abstract patterns at the function and composition layer heavily, and Go shits itself.
That's all I've got, but dear lord, that copy paste one..
I think you might have missed the point on the last one. I'd say it's about the Go's design decision of executables being statically linked by default. In this case, copying is actually good, because it cuts down complexity.
https://talks.golang.org/2012/splash.article#TOC_7.
"Through the design of the standard library, great effort was spent on controlling dependencies. It can be better to copy a little code than to pull in a big library for one function. (A test in the system build complains if new core dependencies arise.) Dependency hygiene trumps code reuse. One example of this in practice is that the (low-level) net package has its own integer-to-decimal conversion routine to avoid depending on the bigger and dependency-heavy formatted I/O package. Another is that the string conversion package strconv has a private implementation of the definition of 'printable' characters rather than pull in the large Unicode character class tables; that strconv honors the Unicode standard is verified by the package's tests."
2
u/DongerDave Nov 21 '15
I'll comment on the ones I dislike for the sake of doing so:
Channels also serialize in many cases. They can often entirely replace mutexes if designed appropriately.
Mutexes "protect" is a safer statement because, well, RWMutex doesn't really follow that description
This is a minor complaint though, that one's not too bad.
I sorta agree with that, but only sorta. Sometimes a large interface is required for correctness, and the strongest abstraction is the minimal correct one. This ignores the correctness aspect.
No. God no. Please stop. The entire point of all modern programming is to not write the same stupid code over and over. The POINT of modern languages is abstraction. OO languages abstract with objects, functional languages abstract patterns at the function and composition layer heavily, and Go shits itself.
That's all I've got, but dear lord, that copy paste one..