|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-12-12 13:07:46
From: "David Abrahams" <david.abrahams_at_[hidden]>
> From: "Peter Dimov" <pdimov_at_[hidden]>
>
> > Renaming 'append' to 'push_back' is not simply unnecessary, it's
harmful.
>
> That's an interesting point of view that I never expected. Why is it
> harmful?
Because it's not a push_back.
push_back(c, v) is a mutating operation on c. After it c has one additional
element pushed to its back, v.
append(a, b) is a pure function that returns the concatenation of a and b.
I might be wrong, though; it's been a while since I looked at anything
Lisp-related.
-- 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