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: Justin Moore <justin@xxxxxxxxxxx>
Cc: Freeciv Developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [RFC PATCH] init_techs
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 24 Sep 2001 09:25:44 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Mon, Sep 24, 2001 at 01:11:42AM -0400, Justin Moore wrote:
> 
> > > These callbacks should be
> > > content-oblivious, and it should be up to the specific functions to
> > > interpret the data correctly.
> >
> > That way lies madness....
> 
>    And I maintain that your way lies scores of programmers that want to
> strangle someone because there is only The One (or Four) True Way(s) to
> handle this stuff.  IMHO, Perl is the best way to parse strings; I'm just
> trying to give programmers a content-oblivious, Perl-like way to parse
> incoming data.

Arien's concern is code duplication and I think he is right. There
have to be general utility methods to parse parts of the arguements
(like a string, a number or a player name). These utility methods have
to be complete, i.e. also have to contain error handling code.

What about a small language? Something like "hard;set foobar 1;saveturns=56;" (;
can be replaced by \n)

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  reality.sys corrupt. Reboot Universe? (y,n,q)


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