|
Boost : |
From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-04-26 18:15:29
"Peter Dimov" <pdimov_at_[hidden]> wrote in message
news:099701c54ab2$8f8fb080$6401a8c0_at_pdimov2...
| Thorsten Ottosen wrote:
| > I think you have to explain why they are not different then.
|
| The burden of proof lies usually with the person making the statement. ;-)
no, the burden of proof lies on the person making the controversial statement;
in this case you.
stuff like "value-based programming is not different from OO-programming" just
seems weird to
me; we probably won't get anywhere before we can agree on how to define these
two terms.
| The reference semantics vs value semantics axis is orthogonal to OO, in my
| opinion.
| The fact that in C++ you can't (efficiently) have polymorphism with
| value semantics doesn't mean that copying a value and copying a polymorphic
| object are conceptually or fundamentally different.
| A cloning pointer is a very good approximation of a polymorphic value. I
| don't see why you consider it conceptually different from a value.
because you had to put "polymorphic" in front of "value" to describe what it
means;
polymorphic objects don't have value-based copy-semantics; you can't provide
meaningful copy-constructor
and copy-assignment operators.
A "value object" implies something that behaves as an int; a "polymophic
object" implies something that
needs to allocated dynamically and which has virtual functions.
trying to make a polymorphic object behave like a value object is confusing a
best.
-Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk