Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] Re: (PR#12706) [PATCH] Events framework
Home

[Freeciv-Dev] Re: (PR#12706) [PATCH] Events framework

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#12706) [PATCH] Events framework
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Wed, 27 Apr 2005 05:23:24 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12706 >

On Tue, 26 Apr 2005, Jason Short wrote:

> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=12706 >
>
> 1.  The vast proliferation of api_* functions in server/ is really bad.
>  Everything has an API, not just script functions.  If you need so many
> functions make a new directory (server/script).

Ok. You could have removed them all with "rm api* script*" though. :-)

> 2.  Why do the unit and player function (like print_unit) in events.lua
> have a return value?

Because I copy/pasted them from an older script I had, and I didn't bother
removing it, it does no harm. They are not callbacks, but helper
functions.

> 3.  What's the difference between script_signal_emit and script_signal_new?

One "emits" a signal i.e. executes all callbacks associated at that moment
with that signal. The other creates a new signal type. I guess I will
rename script_signal_new to script_signal_create.

> 4.  Most of the .c functions do not have a single line of comment in
> them.  The code and design are completely unintelligible to me.

It is not that hard to understand, but yes, there will be comments. I just
have not made them yet because:

a) I get terribly bored writing comments.
b) I have not finished writing the rest of the code yet.
c) Because of a) I try to only do comments once, ergo, only when the code
   is in final form or just prior to commit.

I think I will punch the signals API a bit more, it is good, but could be
better. The comms module also needs some kicking. I18N I suppose is
fine.

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa





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