Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2004:
[Freeciv-Dev] Re: (PR#8372) [RFC] Inline generator
Home

[Freeciv-Dev] Re: (PR#8372) [RFC] Inline generator

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#8372) [RFC] Inline generator
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Fri, 26 Mar 2004 22:48:16 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8372 >

On Fri, Mar 26, 2004 at 09:59:32AM -0800, Jason Short wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8372 >
> 
> > [i-freeciv-lists@xxxxxxxxxxxxx - Thu Mar 25 10:09:35 2004]:
> 
> > I want to hear what you think about this idea.
> > 
> > The source is preprocessed by a generator script (written on python,
> > perl or similar). This script transforms functions into macros or
> > inline functions based on a list. These macros or functions are moved
> > into the header file to have effect. The so created source is
> > compiled. You can specify dependencies (other functions, structs,
> > variables) for each function. These dependencies are also resolved. If
> > the generator isn't used the source files will still compile fine.
> 
> I don't like it. 

> I think it will take a lot of time just to solve a
> language problem

I agree here.

> that was solved a long time ago.

But not here. What solutions do you know here?

> And it will give very little technical benefit.

Speed and clarity.

> Also I don't see how a function can be transformed into a macro.

The function has to be of the form
{
  return expression;
}

The generator only has to add the () for the arguments and check that
no argument is used twice.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Make it idiot-proof and someone will make a better idiot."




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