Boost logo

Boost Users :

From: Richard Hadsell (hadsell_at_[hidden])
Date: 2005-07-01 09:31:35


Serge Skorokhodov wrote:

>So there is no reason to prevent customization? Because an uninitialized
>value should be unknown from the domain point of view (at least in the
>domain I'm currently work in:)
>
IIRC, there was a discussion of this during the development of tribool.
Both the name and the purpose of the third state vary according to
application. It could mean "not determined yet," or "we have found that
it can never be determined," or possibly some others, depending on your
understanding of the language. Your application must want the "not
determined yet" meaning, which makes sense for the default value. Other
meanings could choose any of the 3 states as the default value.

If it makes sense for the rest of tribool's behavior, perhaps there is a
way to make the default constructor value configurable, just as the name
of the third state is configurable. At least, someone might like to add
a rationale discussion in the docs, in order to lay the issue to rest.

-- 
Dick Hadsell			914-259-6320  Fax: 914-259-6499
Reply-to:			hadsell_at_[hidden]
Blue Sky Studios                http://www.blueskystudios.com
44 South Broadway, White Plains, NY 10601

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