4 ms·
Yes, const in C++ is interesting, though not as powerful as my proposal, for many reasons: - A const function can modify its arguments - ... and global variable
by kartickv 10y ago
Yes, const in C++ is interesting, though not as powerful as my proposal, for many reasons:
- A const function can modify its arguments
- ... and global variables, as you said.
- You can always const_cast it away.
- A non-const function doesn't identify which argument it mutates.
As for sandboxing, I was talking about sandboxing a library within the app, which is a language-level issue. Not sandboxing the app as a whole, which is more like an OS-level issue. Perhaps your root shell uses a parser and you want to prevent bugs in it from crashing your shell...