From: Dave Aronson Date: 2013-01-07T01:03:25+09:00 Subject: Re: Best practice for &&, ||, and, or On Sun, Jan 6, 2013 at 3:33 AM, wrote: > What I do not like about this approach is that the used operators > depend on the context (condition in if statement / condition assigned > to a variable), not on the purpose (condition vs. control flow). Exactly. On Sun, Jan 6, 2013 at 3:43 AM, David Gamba wrote: > What reason is there for Ruby to have "and" and "or" if you aren't supposed > to use them? Just because it's there, doesn't mean it's good. For instance, why would the world have cold germs if we weren't supposed to catch them? (Yeah, I know, catching a cold is a good thing, from the POV of a cold virus.) Heck, I've got a presentation with over a dozen nasty little gotchas in Ruby. > One thing that I don't like with ruby precedence however, is that ruby > developers decided to give "and" and "or" the same precedence. Yeah, that's very inconsistent with && vs. ||. Yet more reason not to use them. -Dave -- Dave Aronson, the T. Rex of Codosaurus LLC, secret-cleared freelance software developer taking contracts in or near NoVa or remote. See information at http://www.Codosaur.us/.