Hi. My 2 cents on this: The single assignment to a variable in its scope I think forces a little consideration of how things are put together and brings some clarity, but maybe that's just me. I also like the idea of safe publication it brings. As for parameters, I'm not fond of working on them directly (or inadvertently) as the intention of the caller is not necessarily known. I think personally that if a parameter is to be modified, it should be an exception that is documented clearly to make sure the other guy is not surprised.
On Sat, 2011-07-23 at 22:30 +0200, Emmanuel Lecharny wrote: > On 7/23/11 10:08 PM, Johnathan Meehan wrote: > > - General > > Variables should be final where possible. > > Parameters should be final. > Hi, not discussing the coding standards DEFT want to set (not my > business as a mentor :), but can someone tell be what's the real benefit > of using final everywhere ? I always found such usage overkilling, > except for the parameters for exposed methods in an API... (and even then;) >
