[16700] in Kerberos_V5_Development

home help back first fref pref prev next nref lref last post

Re: Coding practices proposals

daemon@ATHENA.MIT.EDU (Sam Hartman)
Fri Mar 18 06:51:47 2011

From: Sam Hartman <hartmans@mit.edu>
To: Greg Hudson <ghudson@mit.edu>
Date: Fri, 18 Mar 2011 06:50:59 -0400
In-Reply-To: <1300423184.2397.621.camel@t410> (Greg Hudson's message of "Fri, 
	18 Mar 2011 00:39:44 -0400")
Message-ID: <tslzkoswvl8.fsf@mit.edu>
MIME-Version: 1.0
Cc: "krbdev@mit.edu" <krbdev@mit.edu>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: krbdev-bounces@mit.edu


You've convinced me that the inner scope example is the only one worth
debating.


>>>>> "Greg" == Greg Hudson <ghudson@MIT.EDU> writes:

    Greg> http://k5wiki.kerberos.org/wiki/Coding_style/Practices#Local_variables

    Greg> That may be one of the more controversial documented
    Greg> practices.  Personally, I think grouping cleanup code together
    Greg> is compelling enough to argue against inner scope declarations
    Greg> for owner pointers.

Hmm.  I'd like to propose dropping the recommendation against inner
scope variables and the requirement to clean up owner pointers in the
top-most scope in this case.

I think a lot of my bias here is from c++, where I've seen a lot of
advantages to declaration near use.
I understand that there are significant cleanup advantages to c++ that
don't apply here.

_______________________________________________
krbdev mailing list             krbdev@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev

home help back first fref pref prev next nref lref last post