Boost logo

Boost :

From: Noel Yap (Noel.Yap_at_[hidden])
Date: 2003-05-04 06:47:32

Floris van den Berg wrote:
> > Why? Noone has given an example of why references can't be considered
> > to be implicitly dereferenced pointers. OTOH, the following clearly
> > demonstrates that they are logically equivalent:
> Ok. Can you give me a reason why a car cannot be considered a small plane
> without wings?
> ...
> No?
> ...
> Perhaps because it isn't. It's a car.
> Wether a reference WORKS somewhat like a pointer is irrelevant. A car works
> somewhat like a plane too, but a car isn't a plane and a reference is not a
> pointer. You are still confusing language definition with language
> implementation.

I thought we were going to drop this? :-)

Anyway, your example is starting to get into philosophy (eg what makes a
table a table?). I believe, the way STL says that a pointer or function
is anything that acts like a pointer or function, respectively, a
reference acts like an implicitly dereferenced pointer. I'l rephrase my
question, "Do or don't references logically /act/ like implicitly
derefenced pointers in _any_ possible implementation of the standard you
can propose?"


Boost list run by bdawes at, gregod at, cpdaniel at, john at