Complete.Org: Mailing Lists: Archives: freeciv-dev: September 1999:
Re: [Freeciv-Dev] Adding scripting language
Home

Re: [Freeciv-Dev] Adding scripting language

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Freeciv Dev <freeciv-dev@xxxxxxxxxxxx>
Subject: Re: [Freeciv-Dev] Adding scripting language
From: Artur Biesiadowski <abies@xxxxxxxxx>
Date: Wed, 01 Sep 1999 19:23:30 +0200

Chris Lawrence wrote:

> I recommend putting in hooks for adding languages, perhaps allowing
> you (the user) to decide which languages to hook up.  For example, I
> might want to use Python, while you might want Guile (lisp, bleech).
> If the hooks are there, and it's a compile-time option, everyone can
> get what they want.

Except the fact that interface functions would have to be done
separately for each language, default rulesets have to use one of them,
some languages might require special handling - like keeping pointer to
script specific instance in main data etc. This is way too much work to
be #ifdefed.

I'm pushing guile because when working with integers (and freeciv could
work only on integers - all units/cities have integer ids) you do not
need to create any object - no need of referencing/dereferencing script
objects from C code. At least TCL have quite complicated integers I'm
afraid.

I'll try to write few routines to show how easy is creating/registering
interface funs with guile. If somebody can come with another language
same straighforward, I'll greet him with open hands.

Artur

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