From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lx4P0-0004lp-El for qemu-devel@nongnu.org; Thu, 23 Apr 2009 15:16:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lx4Ov-0004gQ-8f for qemu-devel@nongnu.org; Thu, 23 Apr 2009 15:16:05 -0400 Received: from [199.232.76.173] (port=47651 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lx4Ov-0004gL-5P for qemu-devel@nongnu.org; Thu, 23 Apr 2009 15:16:01 -0400 Received: from bsdimp.com ([199.45.160.85]:49961 helo=harmony.bsdimp.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lx4Ou-0005Wz-NR for qemu-devel@nongnu.org; Thu, 23 Apr 2009 15:16:01 -0400 Date: Thu, 23 Apr 2009 13:12:50 -0600 (MDT) Message-Id: <20090423.131250.756905613.imp@bsdimp.com> Subject: Re: [Qemu-devel] [7234] Use a more natural order From: "M. Warner Losh" In-Reply-To: <20090423185308.GH3795@csclub.uwaterloo.ca> References: <20090423185308.GH3795@csclub.uwaterloo.ca> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: lsorense@csclub.uwaterloo.ca Cc: blauwirbel@gmail.com, qemu-devel@nongnu.org In message: <20090423185308.GH3795@csclub.uwaterloo.ca> lsorense@csclub.uwaterloo.ca (Lennart Sorensen) writes: : On Thu, Apr 23, 2009 at 06:29:47PM +0000, Blue Swirl wrote: : > Revision: 7234 : > http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7234 : > Author: blueswir1 : > Date: 2009-04-23 18:29:47 +0000 (Thu, 23 Apr 2009) : > Log Message: : > ----------- : > Use a more natural order : : It may be more natural, but it is also less safe. : : After all : : if (0 = x) { : : fails compile, while : : if (x = 0) { : : compiles silently even when you didn't mean that. This style is evil and must die. I don't know any nice way to put it. It encourages sloppiness. Also, it breaks down when you add inequality: if (x < 1) becomes if (1 >= x) which is also error prone. The compiler will warn about your example, but won't warn if I transcribe things wrongly as if (1 < x) : Some people also think month/day/year is more natural as a date format, : but it is confusing and impractical to actually use. True, but irrelevant. Warner