From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-08-20 10:32:54
> I'm placing a full article about this issue in the Files section
> (directory: lambda, file: about_binding.ps). The paper appeared in the
> proceedings of the MPOOL'01 workshop http://www.c3.lanl.gov/~mpool01/
For the PostScript challenged (like me) the article is also available at
It's an interesting read. I still think that for bind, making copies by
default unless instructed otherwise with an explicit ref() is the right
In the general ET case, I generally mirror the signatures of the built-in
operators. For example, x += _1 stores a reference to x, _1 += x stores a
copy of x; x << _1 is an exception, since it's semantically overloaded; I
decided to store a copy of x when it's arithmetic and a reference otherwise.
But never storing a reference unless ref() is used is a possible alternative
as well (for consistency.) It makes the semantics simple and unsurprising.
-- Peter Dimov Multi Media Ltd.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk