[Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
> Obviously, and I get only those features I really want, I can see clear
> how it's done in reality and possibly tune it, I can see how exactly is
> it optimized and if the resulting code isn't bloated. In fact, I'm taking
> the examples from kernel. If you ever had a look at fs code, this is
> exactly the way it works (not only fs code obviously, basically most of the
> whole kernel). Why aren't they using C++ and they are reinventing it?
the linux kernel uses the c and gnu extensions to the c language for a couple
reasons. first, c is the unix os language of choice. that's more of a
historical fact than anything else. because of this it was originally written
in c and will continue to be written in c. it was probably a pretty big step
when the linux kernel adopted the gnu c extensions.
second, the kernel uses c because it doesn't require an accompanying runtime
library. every program we write in userspace is automatically linked against
libc (or glibc) for c apps and libstdc++ for c++ apps. so far as i know its
not possible to separate c++ from its runtime library - where it is possible
in c. libstdc++ is responsible for things like exception handling and rtti.
the reason that we don't want to do what you've done is that its reinvinting
the wheel. writing a class in c++ allows you to pick and choose what you
want, except it has a compiler to tell you when you're doing something
stupid. it also eliminates the overhead of pointer functions. yes... you can
make c look like c++ (sort of), but the reason we don't need to that is
because we can avoid it.
i'd like to clear up any confusion here. since fc2 is going to be an OO based
game and development effort, we won't be using any programming language that
doesn't explicitly support OO programming concepts. there is absolutely *no*
reason that we should spend time wrapping some language with preprocessor
directives to make it work like another language. it's a waste of time and
its going to cause more problems than it would solve.
andy
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, (continued)
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Andrew Sutton, 2001/12/03
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Raimar Falke, 2001/12/03
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Ed Hunter, 2001/12/03
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Ross W. Wetmore, 2001/12/04
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Andrew Sutton, 2001/12/04
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Reinier Post, 2001/12/02
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Petr Baudis, 2001/12/02
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets,
Andrew Sutton <=
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Petr Baudis, 2001/12/03
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Tony Stuckey, 2001/12/03
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Raahul Kumar, 2001/12/04
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Andrew Sutton, 2001/12/04
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Petr Baudis, 2001/12/04
[Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Reinier Post, 2001/12/02
Message not available
|
|