From owner-freebsd-arch@FreeBSD.ORG Fri Jan 28 18:49:26 2005 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B04ED16A4ED for ; Fri, 28 Jan 2005 18:49:26 +0000 (GMT) Received: from smtp3.server.rpi.edu (smtp3.server.rpi.edu [128.113.2.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4605143D45 for ; Fri, 28 Jan 2005 18:49:26 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp3.server.rpi.edu (8.13.0/8.13.0) with ESMTP id j0SInMce031709; Fri, 28 Jan 2005 13:49:23 -0500 Mime-Version: 1.0 Message-Id: In-Reply-To: <20050128173327.GI61409@myrddin.originative.co.uk> References: <20050128173327.GI61409@myrddin.originative.co.uk> Date: Fri, 28 Jan 2005 13:49:21 -0500 To: Paul Richards , arch@freebsd.org From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-CanItPRO-Stream: default X-RPI-SA-Score: undef - spam-scanning disabled X-Scanned-By: CanIt (www . canit . ca) Subject: Re: c99/c++ localised variable definition X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jan 2005 18:49:26 -0000 At 5:33 PM +0000 1/28/05, Paul Richards wrote: > >People used to programming in C++ or Perl (and many others) are >used to defining variables as near to use as possible. This has >never been possible before in C, but now with c99 it is. Well, you could get a similar effect by creating a new scope. >Personally, I find the c++/perl convention to be much less error >prone and more intuitive and since c99 now supports it too it seems >the standards body sees the benefits of this approach as well. > >So, are we going to start allowing this feature to be used in >FreeBSD since it would require a pretty major change to style(9). I used to do it that way (by creating new scopes and defining variables in there). The present style(9) caused me to abandon that practice, and in hindsight I think my routines are probably better off with all the variable-declarations grouped together. I don't feel too strongly about it, but I would slightly prefer that style(9) stay as it is on this. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu