Main Area and Open Discussion > Living Room
Doom 3 Source Code - The neatest code I've ever seen
f0dder:
Renegade: "verbSomething" isn't necessarily always the best, though, and especially not in the case of getters...
if( getOptionEnabled() ) versus if( isOptionEnabled() ) versus if( optionIsEnabled() ) :)
IMHO option #3 quite clearly reads best, but #2 is probably the pragmatic solution wrt. IntelliSense support.
Renegade:
^^ I like your #2 there. Having the verb in front (most often) let's you skip remembering and lets the code completion kick in. For boolean values, "is" creates an additional level of clarity as it set up a yes/no question, which makes it far better than "get".
Navigation
[0] Message Index
[*] Previous page
Go to full version