3 ms·
I just barely picked up Go, and my first impression is that it's very... opinionated. It wants me to do if/else guards a certain way, you have to capitalize fi
by umvi 6y ago
I just barely picked up Go, and my first impression is that it's very... opinionated.
It wants me to do if/else guards a certain way, you have to capitalize first letters of "exported" functions, it won't let me import `fmt` unless I use it, etc. I'm not sure I like it.
- philosopher1234 6y agoThe opinions are by design. By removing flexibility, you can increase uniformity. Instead of having 12 different styles of code, there can be 1. It removes cognitive load, so you can spend your mental energy on solving problems.
- umvi 6y agoAnd that's fine if go were the only language I ever used, but it's jarring going from unopinionated languages to a highly opinionated one. I have to have a special set of "go rules" in my mind to be sure to follow when using go which has the effect of increasing cognitive load. "oh right, go wants me to compress my if else clauses and put the brackets a certain way"
- philosopher1234 6y agoI don’t that appreciates the value enough. Yes, there is a cognitive load to learning the opinions of go (though gofmt keeps you from having to learn a lot of them, as do compiler errors) but that is true of any language. I also think the number of opinions you need to learn is far smaller, as you don’t have as big of a surface area to navigate when making design decisions about daily coding. I think they are net very positive.
- jy3 6y agoI hope you have the presence of mind to realize the amazing benefit this has for the entire Go codebase in existence.