[Freeciv-Dev] Re: [RFC PATCH] init_techs
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
> > > > 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.
And I think type-checking should be independent of parsing. We provide
a standard way to do type-checking. I maintain that merging type-checking
with the initial parsing leads to more complication if a programmer ever
wants to change something. Think about what we went through with changing
int references to pointers; it'd be like that, where once a function took
a different kind of arguments the programmer would have to change code in
three different places. And we'd *still* have people defining their
functions as taking char* but doing an atoi right away.
I will provide quick and easy functions to do type checking, but I
think they should not be incorporated into the parsing code.
> What about a small language? Something like "hard;set foobar 1;saveturns=56;"
> (;
> can be replaced by \n)
Go Raimar go. :)
-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
- [Freeciv-Dev] Re: Split patch (was Re: [RFC PATCH] init_techs), (continued)
- [Freeciv-Dev] Re: Split patch (was Re: [RFC PATCH] init_techs), Ross W. Wetmore, 2001/09/25
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Arien Malec, 2001/09/22
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Arien Malec, 2001/09/22
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Justin Moore, 2001/09/23
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Daniel L Speyer, 2001/09/23
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Arien Malec, 2001/09/23
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Justin Moore, 2001/09/24
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Arien Malec, 2001/09/23
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Justin Moore, 2001/09/24
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Raimar Falke, 2001/09/24
- [Freeciv-Dev] Re: [RFC PATCH] init_techs,
Justin Moore <=
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Reinier Post, 2001/09/24
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Daniel L Speyer, 2001/09/24
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Raimar Falke, 2001/09/24
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Daniel L Speyer, 2001/09/24
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Raimar Falke, 2001/09/24
- [Freeciv-Dev] Server/ruleset unification & grammars [Was [RFC PATCH] init_techs], Arien Malec, 2001/09/24
- [Freeciv-Dev] Re: Server/ruleset unification & grammars [Was [RFC PATCH] init_techs], Stepan Roh, 2001/09/24
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Reinier Post, 2001/09/24
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Raimar Falke, 2001/09/24
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Greg Wooledge, 2001/09/24
|
|