Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: Server/ruleset unification [Was [RFC PATCH] init_techs
Home

[Freeciv-Dev] Re: Server/ruleset unification [Was [RFC PATCH] init_techs

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Daniel Sjölie <deepone@xxxxxxxxxx>, Daniel L Speyer <dspeyer@xxxxxxxxxxx>, Arien Malec <arien_malec@xxxxxxxxx>, Freeciv developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Server/ruleset unification [Was [RFC PATCH] init_techs]
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 1 Oct 2001 14:46:35 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Wed, Sep 26, 2001 at 09:39:29AM +0200, Daniel Sjölie wrote:
> On 2001-09-25 21:02:10, Daniel L Speyer wrote:
> > On Tue, 25 Sep 2001, Arien Malec wrote:
> > > I.e., like the object create syntax, the object spec creates a context for
> > > later attribute setting. We can do away with any of the complex attribute
> > > setting by making the set statement always simple, using the dotted 
> > > syntax for
> > > object references, and separating create and attribute settings. So
> > > 
> > > create tech atomic_theory
> > >   name     = _("Atomic Theory"),
> > >   req1     = "Theory of Gravity",
> > >   req2     = "Physics",
> > >   flags    = "";
> > > 
> > > becomes:
> > > 
> > > create tech.atomic_theory;
> > > set tech.atomic_theory.name _("Atomic Theory");
> > > set tech.atomic_theory.req1 = "Theory of Gravity";
> > > [etc.]
> > > 
> > > The complex syntax is nicer to read, IMHO, but it may be desirable to go 
> > > with
> > > the simpler syntax.
> > 
> > How about:
> > 
> > create tech atomic_theory
> > with tech atomic_theoury
> > set name _("Atomic Theory")
> > set req1 "Theory of Gravity"
> > set req2 "Physics"
> > endwith
> > 
> > This is almost as brief as the brief form above, and is more general,
> > while still meeting the general command syntax.  It could be compressed by
> > combining the first two lines (maybe with braces?) or by changing the
> > TI-EOS-like endwith to a bashish htiw.
> 
> Well...
> Why not do it like this:
> 
> create tech.atomic_theory (name="Atomic Theory",
> req1="Theory of Gravity",req2="Physics");
> 
> can also be written as
> 
> create tech.atomic_theory (
>       name="Atomic Theory",
>       req1="Theory of Gravity",
>       req2="Physics");
> 
> That seems very natural to me...

This is the best solution IMHO for the grouping problem so far.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Python 2.0 beta 1 is now available [...]. There is a long list of new 
  features since Python 1.6, released earlier today. We don't plan on 
  any new releases in the next 24 hours."
    -- Jeremy Hylton at Slashdot


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