2012/10/21 Levi Morrison <morrison.l...@gmail.com> > I would like to point out that in my mind `const` and `read-only` are > not necessarily the same thing. Read-only means that from outside the > class it cannot be modified; the internal class can change it whenever > it wants. Const means that once the value is set it will NEVER change. > Big difference. >
"read-only" means that it is only readable. Like const. If the internal class can change it, you are defining writing visibility (as private or protected). Yes, it is different. Visibility has far more meaning than just saying it's a constant value. In fact, "read-only" is a sub-case of usual visibility management.