Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2003:
[Freeciv-Dev] Re: Make gen2 fair (PR#4659)
Home

[Freeciv-Dev] Re: Make gen2 fair (PR#4659)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rt-guest@xxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Make gen2 fair (PR#4659)
From: "rwetmore@xxxxxxxxxxxx" <rwetmore@xxxxxxxxxxxx>
Date: Wed, 17 Sep 2003 10:34:44 -0700
Reply-to: rt@xxxxxxxxxxxxxx

"0" == true is standard for shell programming, usually because the result is
either OK or returns a (non-zero) error code cataloguing the precise failure.
Of course, documentation of the error code values is always required.

The boolean mentality is evil when differentiation in error codes exists, i.e.
why suppress useful return status. But conversely, there is no reason not to
accept a collective failure in cases where there is no need to differentiate.
The "evil" is equally bad in the other extreme that can't deal with the
flexibility of a collective failure concept when details are not required.

Cheers,
RossW
=====

Gregory Berkolaiko wrote:
[...]
> Somewhat more seriousl, make_island returns different values but only one 
> is ever checked.  And none are commented.  And 0 is the "OK" value, which 
> is not very traditional I think.
> 
> Is it possible to reduce the return values to bool?
> Or/and really do something when the value is -1, -2?
> Or/and comment the values properly?
> 
> G.




[Prev in Thread] Current Thread [Next in Thread]