[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

Re: name for SEFTable



> From tribble Wed Oct 25 17:36:58 1989
> 
> note that C++ uses 'const' incorrectly.  You can have a 'const'
> pointer to an object that change state because another object has a
> non-const pointer.  That's why immutability is different from 'const'.
> An immutable object can't have its state changed at all.

I agree that that's what it does, but I don't agree that it's
incorrect.  "const" applies exactly to what it is applied to.
A "const" pointer is a pointer that may not be changed, which
says nothing about the object it designates.  You would point
to a const object with a const pointer by saying:

	const ConstType * doubleConstP;

while
	
	ConstType * constTypeP;

would be a variable pointer to a const object, and so on.

	michael