Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2003:
[Freeciv-Dev] Re: the lack of respect for cloners
Home

[Freeciv-Dev] Re: the lack of respect for cloners

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raimar Falke <i-freeciv-lists@xxxxxxxxxxxxx>
Cc: "Brandon J. Van Every" <vanevery@xxxxxxxxxxxxxxxxxxx>, Freeciv-Dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: the lack of respect for cloners
From: John Goerzen <jgoerzen@xxxxxxxxxxxx>
Date: Sat, 20 Dec 2003 22:04:37 -0600

On Fri, Dec 19, 2003 at 11:30:35PM +0100, Raimar Falke wrote:
> > Because with Python, you can literally type 1/2 as much code as C#, 1/4
> > as much code as C++, and 1/8 as much code as C to get the same results.
> > You are simply not required to deal with a lot of the low-level bullshit
> > that slows you down in other languages.  As long as performance isn't
> > your primary requirement, this is a Win.
> 
> You are right here. In a commercial application development it may
> yield more profit if you have a short development time (less money to
> pay for the developer) resulting in a more "raw" code (cut the
> optimization step, don't think about complexities, ...) with higher
> hardware requirements. This won't work if even the more perfect
> version is a CPU hog. This more "raw" version of the code will also
> likely contain more general bugs.

I think Brandon is right about Python being a better tool than C for
many projects, and he's also right that code of equivolent quality and
near equivolent speed can be written much faster in Python.  See the
Zope webserver, for instance.  If the FreeCiv project were being started
today, I would suggest using Python for both the client and the server.

However... change for change's sake doesn't make sense to me.  It's not
really clear to me that the effort of adding Python to the existing
codebase would be worth the effort.  I think he under-emphasized the
ease of integrating Python with C as well.  Even if your C codebase is
very clean, integrating it in a general sense with Python is no picnic,
though tools like swig can help.  Not that any other language (except
C++) is much better; it just takes a lot of work to bring C into a
higher-level language.

That said, if the FreeCiv protocol is still as easy to work with as the
last time I looked at it (*cough* 1.0j *cough*), implementing a client
in pure Python shouldn't be a problem.

ObQualification because I know Brandon will ask: Yes, I have personally
integrated Python with C before.  Google for "pyme python".

-- 
John Goerzen <jgoerzen@xxxxxxxxxxxx>                       www.complete.org


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