Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 May 1997 16:41:15 -0400 (EDT)
From:      Tim Vanderhoek <tim@X2296>
To:        Luigi Rizzo <luigi@labinfo.iet.unipi.it>
Cc:        Bruce Evans <bde@zeta.org.au>, j@uriah.heep.sax.de, chat@freebsd.org
Subject:   Re: Variable initialization
Message-ID:  <Pine.BSF.3.95q.970519163335.179A-100000@X2296>
In-Reply-To: <199705191148.NAA04574@labinfo.iet.unipi.it>

next in thread | previous in thread | raw e-mail | index | archive | help
[note list change]

On Mon, 19 May 1997, Luigi Rizzo wrote:

> But anyways I was just trying to understand if there was something
> fundamentally wrong in my preference of 
> 
>     int a = 3;
> 
> in place of
> 
>     int a ;
>     a = 3 ;

The coding style must supplement the purpose of the code.
Thus, some variables must be initialized separately from
their declarations, while some must be initialized with
their declarations.  It all depends on wether the purpose of
the variable is clarified by initializing with the
declaration, or separately.  Some variables just simply feel
like they should be "int a=3;", some "int a = 3;", and some
"int a;\n a=3;".

IOW, those who say things such as YOU MAY NOT NEVER NEVER
INIT AND DECLARE SIMULTANEOUSLY have simply become jaded
after years of programming and have lost touch with the
romantic inside of them.  :)


--
tIM...HOEk
Whoever told you I had a .signature was lying.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.970519163335.179A-100000>