typedefs and structs

thockin at hockin.org thockin at hockin.org
Thu Nov 10 07:39:54 EST 2005


On Wed, Nov 09, 2005 at 01:38:28PM -0600, linas wrote:
> On Wed, Nov 09, 2005 at 11:36:25AM -0800, thockin at hockin.org was heard to remark:
> > Umm, references are implemented as pointers.  Instead of a "zoo of
> > pointers" you have a "zoo of references".  No functional difference.
> 
> Sigh.
> 
> I think you are confusing references and pointers. By definition
> you cannot "store a reference"; however, you can "dereference"
> an object and store a pointer to it.


Sigh, That's funny - I've written C++ code which has references as members
of objects.  You absolutely *can* store a reference.

References are simply a syntactic simplification to eliminate the
different pointer-dereference notation.  If they make you think about a
problem differently, that's fine, but they are really just pointers in
disguise.



More information about the Linuxppc64-dev mailing list