News for hackers. Stuff that matters.
Re:Google’s Go Style Guide by madeofpalk on Friday November 18, 2022 @09:50AM (#33655524)
There's also a bit of Fitt's Law in here as well - I find it a lot harder to select, or put my cursor in, a single letter variable. So if I want to rename `i` to something else, I must carefully select `i`, whereas with a longer variable I find it easier to put my cursor in the middle of `index` and hit F2.
Re:Google’s Go Style Guide by ErikCorry on Friday November 18, 2022 @09:52AM (#33655549)
If you are using a mouse for things like this you already lost though.
Re:Google’s Go Style Guide by shepherdjerred on Friday November 18, 2022 @02:49PM (#33661008)
Most developers use their mouse quite often.
Re:Google’s Go Style Guide by SnooSux on Friday November 18, 2022 @11:04AM (#33656698)
I started using ii as my iterator variable name for similar reasons. Easier to highlight and Ctrl-F for. Also removing ambiguity when using i as the imaginary constant.