Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: generalized unit capabilities
Home

[Freeciv-Dev] Re: generalized unit capabilities

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Andrew Sutton <ansutton@xxxxxxx>
Cc: Freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: generalized unit capabilities
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 5 Dec 2001 20:06:35 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Wed, Dec 05, 2001 at 01:44:59PM -0500, Andrew Sutton wrote:
> On Wednesday 05 December 2001 01:18 pm, Raimar Falke wrote:
> > Reread my paragraph. I'm talking about the technical structure.
> 
> then i'm not really sure what you're referring to since i'm not using any 
> structures, logically or in the code.
> 
> >
> > > it's just an extended bitfield with named bytes in addition to named
> > > flags. if you don't supply the category for flags then your bits end
> > > up as a 64 bit value. then, this has to be split on lookups. i guess
> > > if you mean the "scoped" names, then you're right, but i still don't
> > > see that as a bad thing.
> > >
> > > people have been talking about the desire for generalized unit
> > > capabilities for a while now. you yourself admitted that it was a
> > > shortcoming - if not immediately, then eventually. now you say that
> > > there's no benefit? this is just an additive patch.
> > >
> > > it won't affect any part of the game that chooses not to use it...
> >
> > No code uses it -> it is useless.
> 
> that was part of the point. it's there so people can use it if they want. 
> just because code isn't used immediately doesn't make it useless.

It is useless (dead code) if it is added to the tree and not used. You
may provide this code (at an external location) and see if someone
likes and uses it. Till then it will not be included by me.

> > > > I was thinking that the 100 lines would include comments.
> > >
> > > just curios. how would you do it?
> >
> > See the attached patch. Ok it uses 175 lines, isn't tested and doesn't
> > contain the capability tests.
> 
> so you've done the same thing i have except you keep adding flag fields. 

> now when you test the flag you're going to have to explicitly state
> which field to test instead allowing it to be looked up. it
> introduces a higher chance of writing bugs since you're going to
> have to state which fields to test.

No. Almost all code uses unit_type_flag which handles the case
correctly. Please inform yourself before you make such claims.

> it's not any more or less efficient, aside from that, it's just not
> a very pretty solution - but that's just my opinion.

If you show another problem you may get another solution.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  What's nice about GUI is that you see what you manipulate.
  What's bad about GUI is that you can only manipulate what you see.


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