Boost logo

Boost :

Subject: Re: [boost] [review][constrained_value] Review of Constrained Value Library begins today
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-12-05 02:28:31

----- Original Message -----
From: "Jeff Garland" <jeff_at_[hidden]>
To: <boost_at_[hidden]>; <boost-users_at_[hidden]>
Sent: Monday, December 01, 2008 1:30 PM
Subject: [boost] [review][constrained_value] Review of Constrained Value Library begins today


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,


Boost list run by bdawes at, gregod at, cpdaniel at, john at