To me, the trouble with const in by-value parameters is that it's an implementation detail of the function body, declared to the outside world. On simple functions with obvious implementations, that's no big deal, but I find it better to be consistent. I think a good optimizing compiler is going to notice that a parameter is used as a constant even though it's not declared const. Const can be cast away anyway, so the optimizer really has to look at the code regardless of what is declared.
On the other hand const on a member function itself (meaning const this), or on by-reference parameters, is useful documentation. Cheers, Bruce _______________________________________________ Scintilla-interest mailing list [email protected] http://mailman.lyra.org/mailman/listinfo/scintilla-interest
