Date: Wed, 12 May 2010 14:43:36 +0200 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: Dominic Fandrey <kamikaze@bsdforen.de> Cc: Eitan Adler <lists@eitanadler.com>, hackers@freebsd.org Subject: Re: proposed change to style(9): require yoda style if statements Message-ID: <86zl05thmv.fsf@ds4.des.no> In-Reply-To: <4BEA52CB.8080407@bsdforen.de> (Dominic Fandrey's message of "Wed, 12 May 2010 09:03:39 %2B0200") References: <AANLkTimCLELSQ9YNZ403_PLhKOQCQTcl9H1bfb1ccRNb@mail.gmail.com> <4BEA52CB.8080407@bsdforen.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Dominic Fandrey <kamikaze@bsdforen.de> writes: > I think the pro-yoda faction actually has more convincing arguments, Which ones? Never seen any beyond the basic "helps avoid accidentally typing =3D instead of =3D=3D". It's bollocks, anyway, because a) for every (variable =3D=3D constant) comparison you have ten (variable =3D=3D variabl= e) comparisons and b) good compilers will warn about bare assignments used as conditions. The only practical effect of Yoda style is to make code harder to read. Your .sig is strangely appropriate... DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86zl05thmv.fsf>