|
Boost : |
From: Daryle Walker (dwalker07_at_[hidden])
Date: 2002-11-25 16:57:46
On Monday, November 25, 2002, at 11:46 AM, Vladimir Prus wrote:
> Daryle Walker wrote:
>> [Apologies to the computer scientist who came up with that phrase
>> (w.r.t. GOTOs)]
>>
>> I haven't looked at the serialization library that was just up for
>> review, but some of the comments I saw on this list suggested that the
>> archive classes use virtual operators for reading or writing the basic
>> types. I have a book called _C++ FAQs_ (2nd ed.) that has a blurb
>> about
>> a virtual assignment operator. I think the concept is too funky
>> because:
>>
>> 1. You have no choice about an operator's interface, even if that
>> interface isn't the best for inheritance.
>> 2. The dispatch interactions could introduce subtleties.
>
> Is there virtual assignment operator anywhere in serialization lib?
Not as far as I know. However, all the restrictions and subtleties I
read about virtual assignment operators make me think that no kind of
operator should be (directly) virtual.
>> I have a better idea: use the "concrete function calls a virtual
>> function" idiom. Maybe it could be like:
>
> Ehh... did you arrive to this conclusion based on reading review
> comments? I positively don't see any urgent need for this idiom,
> this would only make Robert change names everywhere.
This conclusion isn't from the review comments, just my gut feeling
against virtual operators. As for implementing it, it looks like
Robert has to redo his classes anyway....
Daryle
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk