From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?Jan_Dj=C3=A4rv?= Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109864: Fix minor problems found by static checking. Date: Tue, 4 Sep 2012 07:29:00 +0200 Message-ID: <25F1A420-CE2F-432B-BDE3-3E973E1B2CC3@swipnet.se> References: <83392zf7bu.fsf@gnu.org> <504506E8.5070506@cs.ucla.edu> <83r4qieszx.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1346736579 27007 80.91.229.3 (4 Sep 2012 05:29:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Sep 2012 05:29:39 +0000 (UTC) Cc: Eli Zaretskii , Paul Eggert , "emacs-devel@gnu.org" To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 04 07:29:40 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T8lhj-0008U1-Sz for ged-emacs-devel@m.gmane.org; Tue, 04 Sep 2012 07:29:40 +0200 Original-Received: from localhost ([::1]:39498 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8lhg-0005w0-UD for ged-emacs-devel@m.gmane.org; Tue, 04 Sep 2012 01:29:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52911) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8lhe-0005vu-GQ for emacs-devel@gnu.org; Tue, 04 Sep 2012 01:29:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T8lhc-0000YM-9P for emacs-devel@gnu.org; Tue, 04 Sep 2012 01:29:34 -0400 Original-Received: from mailout.attendit.se ([83.140.103.4]:54508) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8lhb-0000Xu-RF for emacs-devel@gnu.org; Tue, 04 Sep 2012 01:29:32 -0400 Original-Received: from mail01.melmac.se (mail01.melmac.se [62.20.26.80]) by mailout.attendit.se (Postfix) with ESMTP id 2E21A50093 for ; Tue, 4 Sep 2012 07:23:40 +0200 (CEST) Original-Received: (qmail 6669 invoked by uid 89); 4 Sep 2012 05:29:04 -0000 Original-Received: from h-46-59-42-18.na.cust.bahnhof.se (HELO coolsville.localdomain) (boel.djarv@bdtv.se@46.59.42.18) by mail01.melmac.se with ESMTPA; 4 Sep 2012 05:29:04 -0000 Original-Received: from [95.197.196.85] (host-95-197-196-85.mobileonline.telia.com [95.197.196.85]) by coolsville.localdomain (Postfix) with ESMTPSA id BD90A7FA05E; Tue, 4 Sep 2012 07:29:24 +0200 (CEST) In-Reply-To: X-Mailer: iPhone Mail (9B206) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 83.140.103.4 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:152982 Archived-At: Hello. 4 sep 2012 kl. 05:41 skrev Stefan Monnier : >> GCC false alarms aside, are there any reasons to prefer separate >> declaration and initialization? >=20 > There are software-engineering reasons to prefer the "initialize as part > of declare" so it's trivially obvious that the variable can't > be uninitialized. So in general, we'd first want to investigate other > solutions if such an "init within declare" causes problems. Another good thing is that init within declare variables can be declared con= st if they are not changed later. This may not help compilers much nowdays, but it helps when reading code. Emacs does not use const much. Is there a policy for its usage? Jan D.=