Jump to content
  • 0
Fou-lu

Why the emulator is not Object Oriented?

Question

8 answers to this question

Recommended Posts

  • 0

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.

Share this post


Link to post
Share on other sites
  • 0

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 :P better someone old talk about it

Share this post


Link to post
Share on other sites
  • 0

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...

Share this post


Link to post
Share on other sites
  • 0

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.