Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: unit flags/capabilities
Home

[Freeciv-Dev] Re: unit flags/capabilities

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Andrew Sutton <ansutton@xxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: unit flags/capabilities
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 29 Nov 2001 17:00:22 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Thu, Nov 29, 2001 at 10:28:30AM -0500, Andrew Sutton wrote:
> On Thursday 29 November 2001 10:17 am, you wrote:
> > So you propose to extend the current implementation to achieve a
> > larger flexibility. However this extension doesn't provide an
> > immediate benefit and there is also no project/patch/feature that I
> > know which would benefit. Lastly you can argue that it is a cleanup
> > but a cleanup leaves the interfaces unchanged. And IMHO the flag and
> > role code/handling doesn't need a cleanup.
> 
> possibly not, but you can never underestimate the future needs of the 
> program. why pass up a chance to have something be extensible - especially if 
> it can coexist with the current model. you're right. it doesn't replace 
> anything. that code works fine. as developers find the need for greater 
> flexibility in unit capability specification and testing, they can roll 
> existing code to this framework. when all the code has been rolled over, the 
> older unit_type framework can be extricated from the source completely.

To finish this: without need or benefit _I_ (you may ask another
maintainer) will not include code which will be dead till some use
arise.

> > Because it is a lot of work with no user visible benefit. And from a
> > programmers point of view it is unnecessary (for this large amount of
> > cost).
> 
> it's likely that it could be written to coexist with the current model. 
> rember, everything's based on the unit struct and the unit struct is passed 
> around as a ptr. legacy code can use the existing framework. newer code that 
> prefers an inheritance model can perform the necessary casting operations.

Same question: what benefits will the inheritance model bring? Just to
be more oject oriented?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "I heard if you play the NT-4.0-CD backwards, you get a satanic message."
 "That's nothing, if you play it forward, it installs NT-4.0"


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