Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] Re: (PR#6585) Delta version 5
Home

[Freeciv-Dev] Re: (PR#6585) Delta version 5

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: i-freeciv-lists@xxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#6585) Delta version 5
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Wed, 29 Oct 2003 11:24:34 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Tue, 28 Oct 2003, Raimar Falke wrote:
> On Fri, Oct 24, 2003 at 05:17:23AM -0700, Per I. Mathisen wrote:
> > The generate_packets.py python script is too ugly.
>
> Yes it is ugly. It is the most ugly python script I wrote so
> far. Still I don't know how to make it better.

Following the style guide would go a long way to make it readable, I
think.

> So a bitvector function doesn't follow the usual lowercase function
> names. We need to convert floats to 4 byte integer values. And
> worklists and raw memory have a generic function name but different
> arguments.

We should consider altering higher-level code a little to make lower-level
code simpler.

> I'm stillworking on the capability stuff and have to an idea and a
> first version available. But it enlarges both the generator and the
> generated source by quite some amount. So there is a chance that you
> say that we don't need non-mandatory capabilities for now. This will
> make the generator a bit easier.

I think we need the ability to turn fields on and off for capabilities,
and nothing else. Default values are not necessary. Default values can
only be constants anyway, and we sometimes need more complex solutions.
There is no need to cram this into the generator code, it can be handled
in the code the level above (client/packhand.c and friends).

> > It does not conform to freeciv style guide, to the extent that this
> > would apply. This it should.
>
> The generator or the generated source?

The generator.

  - Per





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