Fou-lu 7 Posted March 25, 2016 Someone would know why the emulator is written in C and not in C ++ ( Object Oriented ). Quote Share this post Link to post Share on other sites
0 evilpuncker 503 Posted March 26, 2016 maybe because the language that everyone that started the project back in time, knew better Quote Share this post Link to post Share on other sites
0 4144 364 Posted March 26, 2016 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. 1 15peaces reacted to this Quote Share this post Link to post Share on other sites
0 Lavenblade 1 Posted March 26, 2016 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++? Quote Share this post Link to post Share on other sites
0 evilpuncker 503 Posted March 26, 2016 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 better someone old talk about it Quote Share this post Link to post Share on other sites
0 Dastgir 1246 Posted March 27, 2016 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... 4 Lavenblade, evilpuncker, Ezeriel and 1 other reacted to this Quote Share this post Link to post Share on other sites
0 Lavenblade 1 Posted March 27, 2016 Ah, I didn't realize they were all forks of one another. Thanks @@Dastgir Quote Share this post Link to post Share on other sites
0 Haru 290 Posted March 27, 2016 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. 2 Nebraskka and Lavenblade reacted to this Quote Share this post Link to post Share on other sites
0 Anisotropic Defixation 18 Posted March 27, 2016 Since this is a rather big project, it makes more sense to use the most solid and well-known language, which would be C. Quote Share this post Link to post Share on other sites
Share this post
Link to post
Share on other sites