[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Proposal for addition: tristate class - 3-state logical type
From:       Michael Pyne <pynm0001 () comcast ! net>
Date:       2005-09-09 23:54:58
Message-ID: 200509091954.58226.pynm0001 () comcast ! net
[Download RAW message or body]


On Friday 09 September 2005 19:17, Olivier Goffart wrote:
> My objections are still the same:  it can be done with a simple int or an
> enum. (where, AFAIK, operators like ! and ~ works also)

Well ! shouldn't work anyways, because it can mean "!= true" or "== false", 
and with a tristate those two choices are not identical.  Similar arguments 
apply to ~.

A simple int is crap, and while an enum would work the ! and ~ operators 
couldn't be expected to have meaning anyways, and you'd also lose the 
operator overloading and bool ctors.

> Can you point me a place in the code where that class will be usefull ?

It would be useful for code that needs to return a code regarding user input 
where either the action was canceled, succeeded, or failed.  I think you can 
imagine that KDE has quite a bit of code that performs user interaction. ;)

To be honest I'm not sold on it needing to be in kdelibs but those specific 
objections are rather groundless IMO.

Regards,
 - Michael Pyne

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic