Hacker News new | past | comments | ask | show | jobs | submit login

I think I'm rather able and intelligent, but there are just so many footguns in golang that my team doesn't have the knowledge to avoid.



Just curious, what are some of those footguns your team is encountering? Only thing that comes to mind is the somewhat tedious error handling imposed by the language. Which language would you say had _less_ footguns than go? Or was this sarcasm and it went straight over my head?


I guess I am just bad at golang.

Loop variable pointer and nil struct is not nil interface are the two that continue to hound us.


Also:

type MyError {}

var _ error = (&MyError)(nil)

errors.As(err, &MyError{})

---

Panicking because it needs to be &&MyError{} instead is a similar gotcha.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: