Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: [RFC PATCH] init_techs
Home

[Freeciv-Dev] Re: [RFC PATCH] init_techs

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Freeciv Developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [RFC PATCH] init_techs
From: Justin Moore <justin@xxxxxxxxxxx>
Date: Mon, 24 Sep 2001 20:26:09 -0400 (EDT)

> > /set attribute nation.Greek.techs Alphabet,Iron Working
> >  ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> An aside: a standard way to denote words with non-alphanumerics must
> be picked.  I don't care what it is, but adding the ability to interpret
> the command line above leads to problems.

   Feel free to suggest a system.  I just write the parsing code around
here (and occasionally serve as village idiot).

> > /easy
> >  ^^^^
> >
> > /hard Caesar
> >  ^^^^ ^^^^^^
>
> It would be better to write this as
>
>   /set ailevel hard
>
> and
>
>   /set ailevel hard Caesar
>
> I never added it because I didn't want to complicate the parsing in
> set_command() any further.  After the cleanup it will be easy.

   Agreed.

> >    The first part in each of these is the command.  The second part is the
> > "char *arg" that gets passed to the function.  These callbacks should be
> > content-oblivious, and it should be up to the specific functions to
> > interpret the data correctly.
>
> Don't you think all commands should be parsed with standard functions that
> perform typechecking?

   I do, but I think they should be in the cmd_* functions, not in the
parsing code.  See my previous e-mails/rants as to why.

-jdm

"You don't give blood then take it back again
 We're all deserving of something more"
 - "Grievance"

Department of Computer Science, Duke University, Durham, NC 27708-0129
Email:  justin@xxxxxxxxxxx



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