[Webkit-unassigned] [Bug 97860] Make functions in Localizer class "const"

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 28 09:59:14 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=97860


Alexey Proskuryakov <ap at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ap at webkit.org




--- Comment #1 from Alexey Proskuryakov <ap at webkit.org>  2012-09-28 09:59:40 PST ---
I'm not convinced that this is a worthwhile thing to do. Const is not really useful for optimization, because the qualifier can be dropped with const_cast at any time, and compiler must expect that. And extra visual noise does not improve readability.

Const is useful to statically ensure correctness, which is not an issue for immutable objects like Localizer class instances. 

There are additional considerations why we don't use const in other cases (e.g. why we don't use "const Node&"), which are out of scope to discuss here.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list