Hi!
On Aug 2, 2008, at 5:41 PM, Andy Lester wrote:
if (foo == false) {...};
if (!foo) ...
The reason I go for == over ! is simply that from experience I know
that I will pass right by a mistake with !, but with the written form
I do not.
Dyslexia?
Poor vision?
I just know I pick up more when we write stuff out. It is not an
always thing, but often if I question code I just write the entire
logic out (especially when nested).
Third, the second is supported if we also add a standard that says
all booleans have a verb, such is "is_standalone" or
"has_memory_cache" rather than "standalone" or "memory_cache". The
verb makes it clear it's a boolean.
Completely agree with you here.
BTW I keep a pretty open mind about most of this. I tend to lean
toward verbose.
Cheers,
-Brian
--
_______________________________________________________
Brian "Krow" Aker, brian at tangent.org
Seattle, Washington
http://krow.net/ <-- Me
http://tangent.org/ <-- Software
_______________________________________________________
You can't grep a dead tree.
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp