
----- Original Message ----- From: "Jeff Garland" <jeff@crystalclearsoftware.com> To: <boost@lists.boost.org>; <boost-users@lists.boost.org> Sent: Monday, December 01, 2008 1:30 PM Subject: [boost] [review][constrained_value] Review of Constrained Value Library begins today Hi, There is a thing that i don't like in the design, the fact that you can change the constraint at runtime. I would prefer to have two separated hierarchies, one for constrained values that preserv its constraints, error handling, ... staticaly, and one for those tyhe constraint can be changed at runtime. I expect that the preserving constrained values be implemented in a more space and time efficient way. constrained_value ::= static_type | dynamic_type For the constrained values that can change its constraint at runtime I see two cases, the constraint is attached to the instance, which is your case, or it attached to a type. mutating_type :== by_instance | by_type When attached to a type, the type needs to maintain the set of instances. Instead of changing the type a split operation can be provided resulting in a transfer of the instances satisfying the new constraint to the new type. Of course this meens more space and time consumming, but ... Best regards, Vicente