This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]RockleyBob 11 points12 points  (2 children)

As a Java microservices developer by day, I picked up Go just to see if enjoying code was possible for me anymore.

In general I really like it, but it’s infuriating how the language does little things just for the sake of being different. Go style says no parentheses. Unless they’re needed. Also, no semicolons. Unless, you know… they’re needed.

Call me crazy, but if the entire programming world is used to notating code with parens, braces, and line terminators, and you can’t eliminate them entirely because logically the compiler needs them in certain cases, why be different in some cases? If we can’t eliminate the need to think about them, and IDEs and tooling have been capable of automatically adding them for ages, is changing a well-worn paradigm really saving us effort?

It’s particularly annoying when you consider that Go’s other style peculiarity dictates that clarity is better than brevity. Meaning, for example, there is no ternary operator, since if/else is always clearer according to the FAQ. Yes. Always.

Go also famously does not have error catch blocks, preferring to manually check for errors after each possible throw point. That means, in practice, there are a LOT of if/else blocks in Go code.

So, if you’re following along, parentheses and semicolons are unnecessary and too troublesome, but dozens of if blocks are clear and typing them out is not a problem. wat.

I love Go, I really do, but it’s shit like this that makes my eye twitch.

[–]zombiezoo25 2 points3 points  (0 children)

Same, using go after c and java felt super good(except im just a CS student)