|
From: | Wojciech Meyer |
Subject: | Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109864: Fix minor problems found by static checking. |
Date: | Tue, 04 Sep 2012 19:22:44 +0100 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) |
Stefan Monnier <address@hidden> writes: >> GCC false alarms aside, are there any reasons to prefer separate >> declaration and initialization? > > 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. I would be also adding 'const' after such initialisation if not mutated later. > > > Stefan > > -- Wojciech Meyer http://danmey.org
[Prev in Thread] | Current Thread | [Next in Thread] |