Boost logo

Boost :

From: Floris van den Berg (flvdberg_at_[hidden])
Date: 2003-05-04 02:58:47


----- Original Message -----
From: "Noel Yap" <Noel.Yap_at_[hidden]>
To: "Boost mailing list" <boost_at_[hidden]>
Sent: Sunday, May 04, 2003 3:28 AM
Subject: Re: [boost] Re: in/out parameters, codingstylesandmaintenance

> Floris van den Berg wrote:
> > > Like I said before, references are implicitly dereferenced pointers.
> >
> > You are confusing language implementation with language definition.
>
> Implementation aside, do or don't references act like implicitly
> derefenced pointers? Perhaps I shouldn't've used a metaphor above.

They don't for the reason i described already. A reference is an alias, a
pointer is a memory address. That a reference WORKS as a special pointer is
an implementation detail. It has nothing to do with the language
specification.

> Yes, a reference is an alias. OTOH, the fact that this is the
> definition implies that it will act like an implicitly dereferenced
> pointer. I just prefer to think of it the other way around (so there's
> less memorization involved) -- if a reference is an implicitly
> dereferenced pointer, it must be an alias to an existing object,
> regardless of how that object is allocated.

We seem to agree, but in different wordings. Shall we go back to the *real*
subject? :)

Floris


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk