|
Boost : |
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2006-07-06 16:22:20
Peter Dimov wrote:
> Thorsten Ottosen wrote:
>
>
>>If you not willing to accept that value-based programming and OO
>>programming are different disciplines, we will never agree on this
>>one. Period.
>
>
> Entity/identity-based and value-based are different, no question. What is
> controversial is your claim that the mere presence of a virtual function by
> necessity implies that the identity of the object is important (as opposed
> to its value).
I think I'm merely saying value-sematics are not the most important to
worry about, even for shape objects.
> To give an example, in the texbook OO hierarchy Shape -> Circle, Square, ...
> the identities of the objects play no role, they are pure values. You can
> copy a collection of shapes and you'll have a perfect replica of the
> original.
Sure, and ptr_container also allows you to copy the collection, albeit
a little less convenient than with operator=().
-Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk