From: Rob Stewart (stewart_at_[hidden])
Date: 2005-04-27 12:21:44
From: "Thorsten Ottosen" <nesotto_at_[hidden]>
> "David Abrahams" <dave_at_[hidden]> wrote in message
> | "Thorsten Ottosen" <nesotto_at_[hidden]> writes:
> | > 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.
> | A polymorphic object doesn't need to be allocated dynamically.
> if you want it to act polymophic you have to.
Pass it to a function taking a reference to a base class; it acts
polymorphically. Where the object is allocated is orthogonal.
> | > trying to make a polymorphic object behave like a value object is
> | > confusing a best.
> | Who does it confuse? Pimpl is a commonly used and well understood
> | pattern for doing just that.
> Pimpl is an ugly hack for compilation firewalls.
Regardless of your opinion of the technique, Dave's statement
-- Rob Stewart stewart_at_[hidden] Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;