Boost logo

Boost Users :

From: Nat Goodspeed (ngoodspeed_at_[hidden])
Date: 2006-09-12 08:02:25


> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Scott Meyers
> Sent: Tuesday, September 12, 2006 1:09 AM
> To: boost-users_at_[hidden]
> Subject: [Boost-users] Library Interface Design
>
> I've always been a big fan of the "don't let users create objects they
> can't really use" philosophy. So, in general, I don't like the idea
of
> "empty" objects or two-phase construction. It's too easy for people
to
> make mistakes.

[Nat] I try to design for single-phase construction myself.

The aberrant use case that I've bumped into is deserialization.
Intrusive serialization can preserve single-phase construction -- but
what if the class designer didn't anticipate the need to serialize?

I haven't yet worked with a serialization framework smart enough to
consider constructor arguments. (I haven't yet worked with the Boost
Serialization library, either; forgive me if this is already a solved
problem.)


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net