▲ 8 ▼ Ask: The new gopher experience
I'm interested in the experiences of recent converts to Go. Specifically, what bugs and problems you ran into when you were learning the language, coming from another programming language.
1. What were the biggest problems you encountered?
2. What mistakes have you made (e.g. not realising that ListenAndServe is blocking)?
3. What is your biggest cause of panics?
Register to comment or vote on this story
1. Project structure and package based design was the hardest to wrap my head around
2. My stubborn-est mistake is not closing that net.conn. As a side note, I had vast problems(mistakes) jumping to concurrency right from the start. Had huge memory leaks and data races, simply because I was guess-coding. The godoc and gospec are so straightforward that I didn't have any excuse, other that not going through it.
3 Well nil pointer dereference of course. All those facepalms
Yes I found it really annoying that they force you to use a particular structure at first. I don't mind so much now but still prefer project based folders with dependencies to the massive monorepo style of go. Maybe using vendor and dep we can get there eventually.
The biggest problem I had was getting my head around pointers vs method receivers and which to use (I ended up using pointers for almost everything). Also was tripped up by map key iteration order changing. Otherwise it's been pretty plain sailing learning go compared to some other languages.
1. GOPATH, and static typing