On Sun, Oct 28, 2012 at 3:12 PM, Filip Pizlo <[email protected]> wrote:
> The point is that a rule mandating const methods to return const pointers > prevents me from saying that getting a pointer from a container doesn't > change the container. > Um, yes, that's exactly the point. My argument was that it's very rare that such pointers cannot be used to subsequently affect state visible to the container. Hence with any such rule in place you risk there being fewer uses of const. > I don't think anyone is handing out bonuses for the number of times we use the const qualifier. Removing physically-but-not-logically-const uses of const is a win in my book, not a loss. Converting to definitively-const-safe functions (i.e. const T* foo() const), or failing that pairs of accessors (one const, one non-const), is even better. PK
_______________________________________________ webkit-dev mailing list [email protected] http://lists.webkit.org/mailman/listinfo/webkit-dev

