[Freeciv-Dev] Re: Make gen2 fair (PR#4659)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
"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.
|
|