From kde-core-devel Mon Oct 04 18:14:49 2004 From: Richard Dale Date: Mon, 04 Oct 2004 18:14:49 +0000 To: kde-core-devel Subject: Re: RFC: A new helper class Message-Id: <200410041914.49524.Richard_Dale () tipitina ! demon ! co ! uk> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=109691363208392 On Monday 04 October 2004 15:13, Harri Porten wrote: > On Mon, 4 Oct 2004, 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==0 -> false > > ret<0 -> error/exception > > Funny. I'd interpret an value of 0 as meaning success in a C api. So it > seems like this convention is not *that* safe ;) I loathe it when people code something like this: if (!strcmp(thing, otherthing)) { ... } Booleans should be booleans, and nothing else should be a boolean in my opinion. -- Richard