review request for 7008713: diamond conversion of kerberos5 and security tools

Sean Mullan sean.mullan at oracle.com
Mon Dec 27 11:58:50 PST 2010


On 12/22/10 9:04 PM, Stuart Marks wrote:
>> BTW, what are we supposed to review? Besides going through the patch and making
>> sure each change is good, the only thing I can think of is looking for lines
>> need coinification but untouched. Made some simple greps and found none yet.
>
> A fair question. While most of the changes are mechanical, I think the main
> criterion is, "does this improve the code?" The diamond operator doesn't (or at
> least, shouldn't) change any semantics of the code, so this is all about style,
> readability, conciseness, etc.
>
> Using the diamond operator definitely makes the code *shorter*. Whether it's
> *better* doesn't necessarily follow from that. In most cases, though, using
> diamond is better, I think.
>
> I'd be curious if you saw any instances where you thought that it would be
> better not to use diamond. It's not a requirement to use diamond everywhere
> possible. That's one of the points of this exercise, which is to put the new
> language features through their paces on real code, and to see how well it works
> out.

One instance where I think it is debatable as to whether it improves code 
readability is if the variable is declared somewhere else in the code. In these 
cases I find myself scrolling upwards or searching to find the declaration to 
see what type the parameters are.

--Sean



More information about the security-dev mailing list