Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset
Home

[Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Reinier Post <rp@xxxxxxxxxx>
Cc: Freeciv developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset unification)
From: Daniel Sjölie <deepone@xxxxxxxxxx>
Date: Sat, 27 Oct 2001 23:39:08 +0200

On 2001-10-27 20:51:26, Reinier Post wrote:
> This is a bit old, but anyway ...

When I read your reply I get the feeling that we misunderstand each
other somehow... I might be too tired to be able to straighten things
out but I'll give it a try...

> On Tue, Oct 02, 2001 at 02:08:56PM +0200, Daniel Sjölie wrote:
> > On 2001-10-02 13:27:50, Reinier Post wrote:
> > > On Tue, Oct 02, 2001 at 10:00:24AM +0200, Daniel Sjölie wrote:
> > > 
> > > > I think there is great potential for confusion if you do something like
> > > > the example presented with units.archers.name = "Bowmen" and
> > > > units.archers suddenly cease to exist... Brrr... :)
> > > 
> > > But as soon as I add the /rename command to rename players (very useful
> > > if you pick the wrong name initially) this will already happen in the
> > > existing interface.  How do you propose to refer to players on the command
> > > line other than by their name (or a unique prefix of it)?
> > 
> > Well, I think the nation name would be a good choise... I don't
> > think that you should be able to rename a variable (that's what a player
> > is here) runtime... I think it can be really confusing and I think
> > that's a serious problem...
> 
> Renaming would really be handy, for example, if you end up playing
> as Hitler by accident.  I've seen this happen.  I agree it can be
> confusing.

I imagine this to be done as:

> show players
1: Napoleon
2: Hitler
3: Cleopatra
> show players[2].name
Hitler
> set players[2].name = Churchill
> show players[2].name
Churchill
> show players
1: Napoleon
2: Churchill
3: Cleopatra

I think this is sufficiently clearer that the bother of having to use a
number instead of the more easily seen name is outweighed...

> > However, I was not thinking about runtime issues really...
> 
> But to me this is the main benefit of this exercise: to treat
> 'configuration time' with the same syntax and semantocs as runtime
> settings.
> 
> > When you want
> > to edit "objects" "live" these problems will come up (how would you
> > refer to a individual unit by your model?
> 
>   unit.556
>   unit[556]
>   unit556
> 
> (without a strong preference) to select a unit globally, or
> 
>   "Boston".unit3
>   30,18.unit5
> 
> to pick a unit relative to some object.

Here I would like:

> show cities
....
23: Boston ...
...
# or
> show players[2].cities
....
23: Boston ...
...
> show cities[23].units[3]
Settler...

Sure, it's a _lot_ more verbose but you still can do what you want...
My point about "run time" versus "configuration time" was that
identifiers are only intuitive in the second of these... I certainly
have nothing against being able to edit "run time objects" - but they
_are_ different...

> You could introduce a .name field for every object, that way a unit can
> be called "Harry" and referred to by that name - the difference with an
> identifier in the command language would be that the name would be part
> of the game structure, saved in savegames, transmitted to the client.

This is what I object to... This magic connection... Honestly, I think
it's horrible... It really _would_ give me nightmares...

> > it doesn't have it's own
> > individual name) and I don't think it's worth the effort to try to make
> > it too smooth... I mean that even if it's not very pretty to edit a
> > player live by refering to the player id I think it's ok...
> 
> Yes, individual command-line updates of objects aren't very useful,
> but they are easy to support.  Technically you can play Freeciv from
> the command line once you have them.
> 
> The language only starts to bubble with control structures or generic
> variables a la SQL.  That would give you the ability to really
> program things.

I don't really get what this has to do what I wrote...

> > The primary purpose as I see it is to edit variables/objects _before_
> > a game is started... That is, editing classes/templates is more
> > important than editing objects...
> 
> Yes, definitely, but classes are objects in Freeciv, so you get the
> editing of objects practically for free.  All you need to do is ensure
> that a player can not read or write information s/he is not entitled to.

Well, what one considers class or object may vary... Here's my
definition: Classes is what you use to create objects...

Units in the running game are objects created from the classes that are
defined before the game starts... I think there is a real difference
between all the archers in the game and the definition of how these will
be...

Well, I'll leave it at that for now... Do you feel that we understand
each other?

/Daniel

-- 
Now take a deep breath, smile and don't take life so seriously... :)


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