Re: [Freeciv-Dev] set_trade_prod.
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Tony Stuckey wrote:
>
> set_trade_prod (the part that handles trade routes and corruption)
> is called only from set_food_trade_shields (the part that handles
> worker/tile aggregation). It appears to me to be a superfluous
> distinction.
> Should these functions be merged together? Is there a reason to
> keep them apart?
I haven't closely looked at that case (and anyway its already
changed in cvs :-) but in general if a function does one specific
thing in a self-contained manner, then I think its reasonable to
keep it as a separate function, even if it is only called from one
place. I tend to prefer lots of smallish functions, _provided_
they are reasonably clearly thought out, and preferably well
documented (the latter unfortunately not much the case in freeciv).
-- David
|
|