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

I feel overall those are very reasonable rules. What I do differently:

1) Add context to errors - ok but sometimes the parent caller doesn't expect or wants that.

2) one-letter variables: I use them more, for example k,v for key,value loop through the map, n can be counter, or x is some value inside the loop.




Yeah I actually agree, will make them sound less like a must. In early Go times people would use one-letter variables everywhere which was horrible.




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

Search: