Re: Coding style question - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Coding style question
Date
Msg-id 19909.1162496665@sss.pgh.pa.us
Whole thread Raw
In response to Re: Coding style question  (<korryd@enterprisedb.com>)
Responses Re: Coding style question  (<korryd@enterprisedb.com>)
List pgsql-hackers
<korryd@enterprisedb.com> writes:
> initializers also force you to declare variables in the scope where they
> are needed.  Instead of declaring every variable at the start of the
> function, it's better to declare them as nested as practical (not as
> nested as possible, but as nested as practical).

I agree that in many places it'd be better style to declare variables in
smaller scopes ... but that's not the point you started the thread with.
In any case, the initializer-vs-assignment decision is the same no
matter what scope you're talking about --- I don't see how that "forces"
you to do it either way.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Henry B. Hotz"
Date:
Subject: Re: Design Considerations for New Authentication Methods
Next
From: imad
Date:
Subject: Re: Coding style question