From: Chad Perrin Date: 2008-03-29T14:58:14+09:00 Subject: Re: Boolean Operators --tThc/1wpZn/ma/RB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 29, 2008 at 08:22:00AM +0900, Mark Dodwell wrote: > Quick question: >=20 > I know that the 'and' and 'or' operators in ruby have the same > precedence, and '&&' has a higher one than '||' - but is there a best > practise for which one to use when precedence isn't important? I think "best practice" in this case is to use whatever makes it most readable. I tend to like "and" and "or" (except when I don't). Notable exceptions include operators like ||=3D and &&=3D, which don't use "and" and "or". --=20 CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] Ben Franklin: "As we enjoy great Advantages from the Inventions of others we should be glad of an Opportunity to serve others by any Invention of ours, and this we should do freely and generously." --tThc/1wpZn/ma/RB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.8 (FreeBSD) iEYEARECAAYFAkft2nMACgkQ9mn/Pj01uKXULACgx9PNeYPZdwS6JaNePkpXf0B/ AHIAoMhGM813Av25A89pCt9OYiatA8gm =Ej3b -----END PGP SIGNATURE----- --tThc/1wpZn/ma/RB--