From owner-freebsd-hackers@FreeBSD.ORG Thu May 13 10:26:43 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 837521065670 for ; Thu, 13 May 2010 10:26:43 +0000 (UTC) (envelope-from alexanderchuranov@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 576DF8FC19 for ; Thu, 13 May 2010 10:26:43 +0000 (UTC) Received: by pwi9 with SMTP id 9so706517pwi.13 for ; Thu, 13 May 2010 03:26:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=Nt7yIVDhCX4uJsY6SNuJ21jNCKd7JxpqX83V65NBA9I=; b=FGHohiEzw/Fw2Lhg+pvdh1BH1WKOUCDY3Meb+E3i6AIB/3fDhWrZSsi8XcwcId/4Gq DenzFCtWcF6xiYoqXkEQiHt3qKkG9QxVQ26rTXrtN9Nqe0A+qK4g81Wo4bYnl/hGIpEU qE5hG6dxhX5f6IEJEt1iGYEp2dYZpHRWTA/Rw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=KD5t99OqHax0Rf5kuZftZ78IGb8KM2/tO1ub01YzUiI/TK6lFZgqMwLN2CCvJmq2d9 ECfKxk8SkEU3r8ZokTr3C+oe0CJLvsYsnQmSYY/WDxYmbxAeAwRQQYG7Pp6CDe1AOGyK UhmZaj3rIxIkSE75xim32jhzNOGk94Zof8kp8= MIME-Version: 1.0 Received: by 10.142.207.13 with SMTP id e13mr396026wfg.21.1273746402676; Thu, 13 May 2010 03:26:42 -0700 (PDT) Received: by 10.142.193.6 with HTTP; Thu, 13 May 2010 03:26:42 -0700 (PDT) In-Reply-To: References: Date: Thu, 13 May 2010 14:26:42 +0400 Message-ID: From: Alexander Churanov To: Eitan Adler Content-Type: text/plain; charset=ISO-8859-1 Cc: 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: Thu, 13 May 2010 10:26:43 -0000 2010/5/11 Eitan Adler : > My proposal is simple: > require that any if statement that compares a constant to a mutable variable > be written as > if (constant == variable) > instead of > if (variable == constant) Use "const" qualification. It's portable and does not require rewriting conditionals in any way. Alexander Churanov