|
|
|
|
|
by icey
4850 days ago
|
|
I had the same problems when I first started learning the language, and while I'm certain I've got a lot more to learn I found that making a habit of reading lots of source code made a huge difference. After a little while you start thinking about "can this code be clearer? Are the intentions obvious?" and that makes the code much easier to write. Go is incredibly easy to refactor, so instead of worrying about being exactly right, you can focus on "is this easy to reason about?". My experience has been that this process will get you very close to idiomatic code on its own. |
|
It's stuff like that, things I already know how to do in other languages but whose syntax eludes me in Go. I think all I can do is power through it until I gain some familiarity, though. Good thing the people in the IRC channel are amazingly helpful.