[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109864: Fix minor problems found
From: |
Jan Djärv |
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 |
Hello.
4 sep 2012 kl. 05:41 skrev Stefan Monnier <address@hidden>:
>> 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.
Another good thing is that init within declare variables can be declared const
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.
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109864: Fix minor problems found by static checking., Eli Zaretskii, 2012/09/03
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109864: Fix minor problems found by static checking., Stefan Monnier, 2012/09/03
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109864: Fix minor problems found by static checking., Paul Eggert, 2012/09/03
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109864: Fix minor problems found by static checking., Eli Zaretskii, 2012/09/03
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109864: Fix minor problems found by static checking., Paul Eggert, 2012/09/03
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109864: Fix minor problems found by static checking., Stefan Monnier, 2012/09/03
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109864: Fix minor problems found by static checking.,
Jan Djärv <=
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109864: Fix minor problems found by static checking., Paul Eggert, 2012/09/04
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109864: Fix minor problems found by static checking., Jan Djärv, 2012/09/04
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109864: Fix minor problems found by static checking., Paul Eggert, 2012/09/04
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109864: Fix minor problems found by static checking., Jan Djärv, 2012/09/04
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109864: Fix minor problems found by static checking., Jason Rumney, 2012/09/04
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109864: Fix minor problems found by static checking., Stefan Monnier, 2012/09/04
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109864: Fix minor problems found by static checking., Wojciech Meyer, 2012/09/04
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109864: Fix minor problems found by static checking., Wojciech Meyer, 2012/09/04
Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109864: Fix minor problems found by static checking., Jason Rumney, 2012/09/04