Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Shades of Go: Traps, Gotchas, and Common Mistakes for New Golang Devs (golang50shad.es)
120 points by spallas on Sept 22, 2023 | hide | past | favorite | 6 comments


So excited for go 1.22 to fix "Iteration Variables and Closures in "for" Statements"


Yea I have lost a few days to debugging that


It’s interesting to read this and reflect on all the times most of these caught me off guard.

I like Go and I do appreciate its simplicity, but like other languages it certainly comes with trade offs and regular imperfections. I’d forgotten so much of this though. Some of it is pretty annoying, haha. I’ll have to remember to be a bit more patient and supportive next time I’m working with someone new to the language.

I suppose for as simple as Go is, simplicity can’t make up for these kinds of unintuitive and confusing snags.


(2015)

Previous:

Common Mistakes for New Golang Devs - https://news.ycombinator.com/item?id=17350776 - Jun 2018 (35 comments)


As a programmer new to the language, this is a fantastic resource. I don't know how many hours I've already lost to some of the finer gotchas of the language. After being seeped in Java and its idiosyncrasies for so long, how humbling it is to get stuck on simple things called out here.


I think the author undersold this as Mistakes for New Golang Devs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: