From: Kevlin Henney (kevlin_at_[hidden])
Date: 2000-09-06 10:55:35
In message <009101c0180c$6e9e0da0$070524d4_at_pdimov>, Peter Dimov
>> Then why call it 'ref'? Why not call it 'value'?
>Because a reference also acts, looks and feels like the object it refers to.
>Although 'value' is worth considering.
OTOH, a reference is an alias, whereas your class holds exclusive
ownership. We sort of need something in between: refue, valerence, ...?
>> There is some precedent in existing practice (the
>> original Great Circle smart pointer library) for
>> using an operator() that returns a reference.
>You mean r().f()? Is this better than r->f()? r->f() is iterator-compatible
>syntax, while r().f() is a nullary function object syntax. I'll have to
>think about it.
I would have said that using operator() for that kind of indirection is
an older rather than a current idiom. I must confess to never having
liked it that much as it just doesn't "look right" :-} Given a choice of
the two, I would take -> over ().
Kevlin Henney phone: +44 117 942 2990
Curbralan Limited mobile: +44 7801 073 508
mailto:kevlin_at_[hidden] fax: +44 870 052 2289
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk