From owner-freebsd-hackers@FreeBSD.ORG Wed May 12 12:45:45 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B50C3106564A for ; Wed, 12 May 2010 12:45:45 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 74C9A8FC08 for ; Wed, 12 May 2010 12:45:45 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 7520B1FFC22; Wed, 12 May 2010 12:45:44 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id A2B2C84495; Wed, 12 May 2010 14:43:36 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Dominic Fandrey References: <4BEA52CB.8080407@bsdforen.de> Date: Wed, 12 May 2010 14:43:36 +0200 In-Reply-To: <4BEA52CB.8080407@bsdforen.de> (Dominic Fandrey's message of "Wed, 12 May 2010 09:03:39 +0200") Message-ID: <86zl05thmv.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Eitan Adler , hackers@freebsd.org Subject: Re: proposed change to style(9): require yoda style if statements X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 May 2010 12:45:45 -0000 Dominic Fandrey 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