@cmuratori @Jonathan_Blow Const is as much a semantic annotation for other humans as instruction to the compiler.
@bhsharp @Jonathan_Blow There should be no data exposed to people who don't know how to access it is my general rule.
-
-
@bhsharp@Jonathan_Blow So if you have to say "const" to tell someone its const, that should never have been in an .h file.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@cmuratori@Jonathan_Blow OK that matches my sense of it. So how do you expose data that should not be changed without performingThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@cmuratori@Jonathan_Blow internal derivative calculations and caching? That's what I use const accessors for. -
@bhsharp@Jonathan_Blow I almost always return by value. This prevents multi-threading problems as well. - Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.