3 ms·
I totally agree, I found myself refactoring my own code and renaming "Get<>()" functions. I wish I had heard someone say that earlier :) m.FindRobot("bot name"
by mattetti 12y ago
I totally agree, I found myself refactoring my own code and renaming "Get<>()" functions. I wish I had heard someone say that earlier :)
m.FindRobot("bot name").GetDevice("laser") would read better as m.Robot("bot name").Device("laser")
- zura 12y agoAgree, but due to my mild OCD, I still keep using Get to pair with Set :)
- enneff 12y agoI also feel that mild nagging feeling, but it passes quickly. The brevity is worth it. :-)
- davvid 12y agoAnother reason I've heard for avoiding getFoo() is that on certain typefaces the lower-case "g" and "s" look similar enough that folks with bad vision can confuse them[1]. Thus foo() and setFoo() are clearer than getFoo() and setFoo(). [1] Given enough time in front of a monitor, we all get bad vision eventually ;-)
- plorkyeran 12y agoThat's easily solved by just not using typefaces that you can't read in your editor.