[webkit-dev] Using C++ constant local variables in WebKit

Ojan Vafai ojan at chromium.org
Thu Dec 1 10:48:46 PST 2011


On Thu, Dec 1, 2011 at 6:49 AM, Antti Koivisto <koivisto at iki.fi> wrote:

> On Thu, Dec 1, 2011 at 4:26 AM, Ojan Vafai <ojan at chromium.org> wrote:
>
>> I don't mind using const in some cases, but I share Darin's concern of
>> littering the code with consts. I'd prefer that
>>
> we come up with a fairly conservative guideline about when to use it. I'm
>> not sure what that would look like. We could start with, what's special
>> about this case, or string parsing in general that makes using const more
>> valuable?
>>
>
> Littering the code with anything is bad. Has misuse of consts been a
> significant practical problem? Perhaps we don't need a specific rule here.
>

I guess not. My real problem is that I don't have a good sense of cases
where it makes sense to use const with local variable, so it's hard for me
to review patches that add it.

But maybe you're right, if it is uses rarely enough, it's not worth the
effort of coming up with a guideline.


>
>    antti
>
>
>>
>>
>> _______________________________________________
>> webkit-dev mailing list
>> webkit-dev at lists.webkit.org
>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20111201/56dcb084/attachment.html>


More information about the webkit-dev mailing list