3 ms·
Every point mentioned was not a gotcha to anyone who read the official introductory tour of the language. The behaviour may be unexpected to newbies, but if you
by brabel 9y ago
Every point mentioned was not a gotcha to anyone who read the official introductory tour of the language. The behaviour may be unexpected to newbies, but if you spent an hour or so learning the language, you shouldn't be falling for these.
- inancgumus 9y agoCheck out the first part too: https://blog.learngoprogramming.com/gotchas-of-defer-in-go-1-8d070894cb01 https://blog.learngoprogramming.com/gotchas-of-defer-in-go-1... I fell to these when I was learning Go for the first time and then I've seen many people also did so. There is no rule like these are gotchas for everyone.
- bsaul 9y agoCompletely agree. This is probably the most comprehensible list of programming language « gotchas » i’ve ever read. It feels really a confirmation that the language authors have succeeded in their goal for simplicity.