Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

mutable already exists and means something different from non-const.

   class foo {
     void b1();
     void b2() const;
     void b3() mutable;
   }
b1, b2, and b3 are all distinct.


Distinct indeed, they've got different names. If they're all called b1() then what? But you're hung up on "mutable" as a keyword. What is the semantics of b1(). The language could make them const semantics instead and so also provide a different keyword for 'non-const' maybe 'nonconst' would do if it really clashes with 'mutable' (I don't care if it is, I'm not proposing this to the committee as it's insane to be incompatible with existing code). When it was all just a twinkle in Bjarne's eye, he could have gone that way. Should have, say I.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: