|
Boost : |
From: Richard Hadsell (hadsell_at_[hidden])
Date: 2002-08-05 09:06:24
Rene Rivera wrote:
>
> >> On Sunday 04 August 2002 09:22 pm, Andrew J Bromage wrote:
> >> > The problem is that while tribools have a well-understood calculus,
> >> > they are suited to many varied interpretations. Calling the third
> >> > value "unknown", "undefined", "maybe", "bottom" or whatever sounds
> >> > to me like calling your floating point type "length" or "probability".
Actually, "whatever" says a lot. Or is that too trendy?
> Haven't followed this thread very closely, and I would certainly use the
> type when available... but... why not just provide a small set of
> names/aliases for the third state? IT would make most people happy this way
> and it would seem reasonable given the context dependency of the type.
Providing more than one name makes it more likely that you will create a name
collision. Even if you put it in the boost namespace, I would still probably
want to import the name or create a typedef in my own or the global namespace,
because I don't want to write "if (x == boost::whatever)" all the time.
If you don't want to leave it to users to create their own appropriate typedefs
or #defines for the third state, how about making the name of the third state a
template parameter? Then a single typedef could define the user's favorite
names for both the tristate type and the third state.
-- 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 list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk