Why can't we define re-assignable const reference variable?

Janice Caron caron800 at googlemail.com
Mon Feb 18 10:33:31 PST 2008


On 18/02/2008, Sergey Gromov <snake.scaly at gmail.com> wrote:
> I'm talking from the standpoint of generalization which you so much care
> about.

Well sure, but if you use a word to mean one thing, and I understand
it to mean something else, then we are not communicating.
Communication has failed, and we are not understanding each other.
Now, I'm no longer confident that I've got anything you've said, or
that you've got anything I've said. We may have been talking at
cross-purposes this whole thread.

When I discuss generalization, I need to be able to say/think "this is
how it's implemented for pointers; this is how it's implemented for
references; this is how...", and so on. If you redefine all the words,
then it just means we'll have to invent new ones in order to talk
properly about the ABI.

Ah well. No matter. :-)

For what it's worth, I was arguing exactly what you are arguing now
(that it should be allowable to modify the class reference of a const
class), several weeks back. But Walter patiently explained why it was
not a good idea, and his arguments were sound, so I got convinced. In
other words, this isn't a new argument - you might want to check out
some of that history (although I'm not sure I can advise on what to
search for - "const" would probably yeild rather too many hits!)



More information about the Digitalmars-d mailing list