Complete.Org: Mailing Lists: Archives: freeciv-dev: November 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: Daniel L Speyer <dspeyer@xxxxxxxxxxx>
Cc: Daniel Sjölie <deepone@xxxxxxxxxx>, Reinier Post <rp@xxxxxxxxxx>, Freeciv developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset unification)
From: Petr Baudis <pasky@xxxxxxxxxxx>
Date: Mon, 5 Nov 2001 20:59:02 +0100

> I agree that the format should be kept fairly simple, but
> extendable-in-self seems like a good idea, and that means including the
> most fundamental scripting constructs in the language itself.  I think
> orthogonality would be a good thing, here (sorry Reiner), but if a
> language has no underlying branching and looping there's almost no way to
> stick those on top of it.  

What's wrong with scheme? tcl?^H^H^H^H^H lua? Those are well-known languages
used for scripting embedded in various applications. I see no point in
re-inventing wheel - it takes unneccessary time and users will have to learn
yet another scripting language.

> forall

Wouldn't be 'foreach' better name then? It's commonly known under that name...
obviously depends on whole syntax in order to make sense :). e.g. in:

forall field in users { field.ai = 1 }

foreach makes much more sense, however

foreach users { ai = 1 }

doesn't sound much better ;). However, I would prefer the first syntax, as
in more complicated constructs, you should be able to refer the actually
processed field:

foreach users { foreach unit { owner = theactualuser } }
# doesn't matter it doesn't make sense ;)

what to write there in the place of theactualuser?

> less

how to implement more with less, without arithmetic commands?

> One additional thought: should we have some sort of arithmetic commands?

If you are going to be so complex (i like generalization, well, nevertheless
interpreter for language specially designed for implementation of freeciv, ...
;), you probably should... everyone should be happy with operators + - * / % ||
&& ! = less more ;)

-- 

                                Petr "Pasky" Baudis

UN*X programmer, UN*X administrator, hobbies = IPv6, IRC
Real Users hate Real Programmers.
Public PGP key, geekcode and stuff: http://pasky.ji.cz/~pasky/


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