On Tue, Nov 29, 2011 at 6:42 PM, Ryosuke Niwa <rn...@webkit.org> wrote: > > - Prevents misuse of variable in a later patch (by a different author) >> through enforcement of const-ness. >> >> >> Prevents one specific type of misuse: Setting the variable to another >> value. And that may not be misuse despite the fact that the original author >> didn’t plan on changing it. >> > > Right, but it tells us the intent of the author, and appears to be useful > even if the variable started with prefixes like "old", "original", and > "previous". >
I'll add that I'd much prefer seeing a const in front of a local variable over seeing a comment like "This variable shouldn't be modified". - Ryosuke
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev