News for hackers. Stuff that matters.
Re:Shades of Go: Traps, Gotchas, and Common Mistakes for New... by Entwickler on Friday September 22, 2023 @09:35PM (#37619870)
So excited for go 1.22 to fix "Iteration Variables and Closures in "for" Statements"
Re:Shades of Go: Traps, Gotchas, and Common Mistakes for New... by __turbobrew__ on Saturday September 23, 2023 @01:09AM (#37620717)
Yea I have lost a few days to debugging that
Re:Shades of Go: Traps, Gotchas, and Common Mistakes for New... by arp242 on Friday September 22, 2023 @10:01PM (#37619995)
(2015)

Previous:

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

Re:Shades of Go: Traps, Gotchas, and Common Mistakes for New... by steve_adams_86 on Saturday September 23, 2023 @02:20AM (#37621003)
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.

Re:Shades of Go: Traps, Gotchas, and Common Mistakes for New... by NBJack on Saturday September 23, 2023 @11:42AM (#37624270)
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.
Re:Shades of Go: Traps, Gotchas, and Common Mistakes for New... by spicymaki on Saturday September 23, 2023 @07:25PM (#37628595)
I think the author undersold this as Mistakes for New Golang Devs.