Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2003:
[Freeciv-Dev] Re: Python?
Home

[Freeciv-Dev] Re: Python?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Brandon J. Van Every" <vanevery@xxxxxxxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Python?
From: Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx>
Date: Sat, 22 Nov 2003 18:10:12 +0000 (WET)

On Fri, 21 Nov 2003, Brandon J. Van Every wrote:

> Hi!
>
> Has anyone ever been interested in making the Freeciv code OO, i.e.
> migrating away from C by gradual, hodgepodge methods?  Has anyone
> proposed using Python for that task?  Has anyone done any work on it?

C++? Forget it. I tried C++ OOifying a previous C project of mine.

The result? The original C code was cleaner and easier to understand. I
ended up using OO to abstract where it made little sense. IMHO OO
programming methods are overrated. They are good for some things like
GUI/GFX code but not for everything.

So I spent a lot of time and effort for no result and my userbase cared
less about the changes. In fact, after some members proposed the switch,
once I started the changes, I got complaints about it! From people who
didn't like C++. Go figure.

I spent precious time with this useless effort when I could have been
adding *features* which is what users really want.

> Slightly different question: has anyone suggested embedding Python
> support in Freeciv?  Has anyone actually done work on it?

Someone did it once and it fell by the wayside. Eventually all successful
programs get an embedded language like I heard someone say way back.

My thoughts on the subject? Once again from my previous game project, I
learned that you really want to separate code from data. Don't mix it.

We currently have code in C and rulesets in an .ini like format. While we
apparently are going to bastardize these standards with the Python based
RPC code generator by Raimar, in fact that change helps split code and
data even further.

Don't go the XConq/LPMud route of mixing code and data by using game
specific languages. In my experience that makes the game slower because of
the parser and makes the barrier of entry to a developer higher.

> I am curious how you feel about these propositions as a developer
> community.  It's a proposal I've been making to the Xconq guys... like
> you, they have a C codebase.  Remains to be seen whether they will bite
> on it.

C is simple, portable and it works. C++ is complex, less portable.
Java leads to ugly code and is slow, Python is even slower.

C# actually would be ok if it could be compiled to binary format, didn't
require a huge runtime to do anything, wasn't designed by MicroSoft.

One thing I appreciate in C# is the effort by the language designer to
make the language as elastic to your programming style as possible.


We need better graphics, sound, higher level features with sane code.
We do not need to get stuck into a language porting morass.

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



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