[Freeciv-Dev] OO model for Freeciv? (was: #define $#@$%! template)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
If I dare say this as someone who has contributed very little code:
Freeciv sceams for an OO language. It's all objects with attributes
and methods; there is quite a lot of code dealing with the problem of
object identities; inheritance and templates could be put to good use,
I also feel that the existing Freeciv object model has some flaws that
might be easier to correct if the code was in an OO language. But
generally, I've found the existing C code easy to use, thanks in part
to the 'cleanup' patches that improve the logic every now and then,
mainly supplied by David Pfitzner.
> I don't know what platforms people are running freeciv on these days, but if
> switching to C++ would mean that some of these platforms would no longer be
> able to compile freeciv, then that is a good enough reason to stick with C.
As far as I know, Freeciv compiles and run on every variant of Unix with X,
using the GUI libraries of Xaw+Xpm or GTK+ libs, all of which are in C,
so you'd still have to carry a lot of C glue code.
It also compiles and runs on MS Windows, Amiga, and OS/2, at least the
client; not all of the clients require X. I'm not sure whether or not
the Macintosh port is operational.
Porting Freeciv to an OO language may not be worthwhile, but would it
be worthwhile to create and maintain an OO design document for Freeciv?
It could describe the code in abstract terms of classes, attributes
and methods. This description can be linked to the actual code:
the LXR interface we already have can be extended to draw diagrams of the
objects and functions present in the code, using GraphViz or some such
system, and the documentation can be hyperlinked to/from these diagrams.
Or perhaps there is a better way of doing this.
--
Reinier Post
- [Freeciv-Dev] what the $#@$%!, Jeff Mallatt, 2000/04/26
- [Freeciv-Dev] #define $#@$%! template, Nicolas BRUNEL, 2000/04/26
- [Freeciv-Dev] Re: #define $#@$%! template, Dan Gohman, 2000/04/26
- [Freeciv-Dev] Re: #define $#@$%! template, Tomasz Wegrzanowski, 2000/04/26
- [Freeciv-Dev] Re: #define $#@$%! template, Thue Janus Kristensen, 2000/04/26
- [Freeciv-Dev] Re: #define $#@$%! template, Michael H. Price II, 2000/04/26
- [Freeciv-Dev] Re: #define $#@$%! template, paulz, 2000/04/26
- [Freeciv-Dev] Re: #define $#@$%! template, Dan Gohman, 2000/04/26
- [Freeciv-Dev] OO model for Freeciv? (was: #define $#@$%! template),
Reinier Post <=
- [Freeciv-Dev] Re: #define $#@$%! template, Tomasz Wegrzanowski, 2000/04/27
- [Freeciv-Dev] Re: #define $#@$%! template, Tomasz Wegrzanowski, 2000/04/27
- [Freeciv-Dev] Re: #define $#@$%! template, Vasco Alexandre Da Silva Costa, 2000/04/27
- [Freeciv-Dev] Re: #define $#@$%! template, Tomasz Wegrzanowski, 2000/04/27
[Freeciv-Dev] Re: what the $#@$%!, Thue Janus Kristensen, 2000/04/26
|
|