Why the emulator is not Object Oriented?

Fou-lu

New member
Messages
145
Points
0
Github
Pedro
Someone would know why the emulator is written in C and not in C ++ ( Object Oriented ).
 
maybe because the language that everyone that started the project back in time, knew better

 
Why it not object oriented? It is.

But it not using C++. Object oriented programming possible not only in C++ but in many other languages.

 
I want to add on to this, actually.

Why was C chosen over C++ respectively?

@@evilpuncker How did they know better? Was there something wrong with using C++?
I mean that maybe in that time the "team" that started the project knew most C instead of C++ or something like that, but that are just assumptions from me
default_tongue.png
better someone old talk about it

 
You need to know history of emulators...

Hercules(founded ~ 2013) is fork of rA

rAthena(founded ~ 2009-2010) is fork of eAthena(founded ~ 2004)

eAthena is fork of jAthena(founded ~ 2002)

So base of emulator is given by jAthena(Japan Athena), at early 2002, maybe c++ wasn't famous enough at that time...

 
I'd like to add a note here: Object oriented has nothing to do with C or C++. You can write object-oriented code in C, just like you can write non-object-oriented code in C++.

There are several reasons not to use C++, including the terrible choices that were made by the language designers, when they tried to engineer solutions for non-problems, or the fact that the majority of C++ developers only know about 20% of the language (too bad, the 20% they know, is a different 20% for each of them).

If Hercules was written in C++, I wouldn't even have considered joining the project (it's more than enough having to cope with that absurd language during my day job).

For some interesting (even if a bit outdated perhaps) reads:

Linus Torvalds - http://thread.gmane.org/gmane.comp.version-control.git/57643/focus=57918

Yossi Kreinin - http://yosefk.com/c++fqa/

Now, back to the main question - why Hercules isn't written using an object-oriented paradigm. That's a question that the original developers might be able to answer, but I'm not. I'm only able to guess, they wrote it the way they knew to.

Some parts of Hercules are object-oriented though. See the DBMap (common/db.c, common/db.h) for an example.

 
Back
Top