--nextPart3528207.OcalFe3CRj Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Le Lundi 4 Octobre 2004 16:14, Jaros=B3aw Staniek a =E9crit=A0: > Allan Sandfeld Jensen wrote: > > Maybe I am old-fashioned, but I prefer the traditional C-way of > > representing this: > > int ret; > > ret>0 -> true > > ret=3D=3D0 -> false > > ret<0 -> error/exception > > > > It provides more than one abnormal termination type, which you often > > need, and this scheme can also handle any function with positive integer > > return-types. > > Depends whether we want to read documentation or have self-documented cod= e. > To montion C-style, there is also other standard behaviour where 0 means > true. > > On the other hand, I am (ans we all) also still _using_ ints for wider > cases. But there was so many cases for functions using 3-state logic that > I've found the class usable. Why not a simple enum ? In most case, an enum is more redable then a bool if you give meaningfull=20 names to the enum members. --nextPart3528207.OcalFe3CRj Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQBBYZAmz58lY8jWrL0RAs+4AJ9448u5eqrd+z38/QW04Y32x43HMgCfXHnt e0hcQfbzxEXk2ZroqrjbNVs= =omzU -----END PGP SIGNATURE----- --nextPart3528207.OcalFe3CRj--