Jump to content
Eternal Lands Official Forums
Sign in to follow this  
Guest Glen Coe

Some hints to the devteam

Recommended Posts

Well, I do believe that an object oriented approach can be a good thing at times - but you should use it as a tool to create better code, and not because someone told you it was wise to use OO.

During the time since I started learning C I've developed more or less my own style (well, noone taught me how or what :0)) and it is somewhat object oriented when ~OO is applicable - for instance I hated the long if() {...} else {...} statements that were used when checking for commands in el.ini, and thought it should be made more intelligently and furthermore enable it to be reused everywhere.

OO programming is a tool, that makes it easier to maintain the codebase; but of course it should be used wisely.

I do believe that it's quite usable in many games - I just wouldn't use it in anything where I need to have full control of the code. C with function pointers doesn't give up the control of your code either, while concepts such as virtual functions makes it a bit difficult to know how the machine treats it + it creates an overhead. At least that's how I feel now, but I haven't worked enough with C++ / g++ -S to say for sure :-). Somehow I just like the C approach (possibly with switch statements) using function pointers instead of virtual functions, after reading more about them since it still feels that I have control of the code.

 

Oh, and here's how I got started:

Basic ->

Pascal/Delphi ->

C and embedded ASM

 

Currently I just do C, but I did like to work with embedded devices on the low-level ;-)

Share this post


Link to post
Share on other sites

OMG. I knew I should have been silent. :(

 

Of course my post was some generalization and as such couldn't be 100% correct. This was my observation based on the sample of my collegues (older and younger than me) and my students.

 

And of course I'm not saying OO programming is worse or better then functional.

Just that someone may prefer this or that and it does not mean one or the other is better or worse. It's based on experience and feelings one has.

Of course some tools may be better suited for some jobs. But many people forget, that the best tool is the one they can use effectively, not the one that is theoretically designed best for given job.

 

Anyway this topic should probably go to flames now and I'll be banned soon :D

 

Regards

 

Chryzopraz

 

Edit: Probably I should also add my language history :)

That is, more or less chronological:

BASIC (various 8 bit computers flavours), Z80 assembler, Pascal, Turbo Pascal, C, x86 assembler, C++, Ada, Perl, COBOL, S/390 assembler, Java, PHP, plpgSQL :blink:.

I'm not including various languages I've seen as a scientist like Lisp, but haven't used to write anything really.

Edited by Chryzopraz

Share this post


Link to post
Share on other sites
And of course I'm not saying OO programming is worse or better then functional. Just that someone may prefer this or that and it does not mean one or the other is better or worse. It's based on experience and feelings one has. Of course some tools may be better suited for some jobs. But many people forget, that the best tool is the one they can use effectively, not the one that is theoretically designed best for given job.

And that's what OO-fanatics forget. They want the game OO (C++ or even Java), because it is theoretically easier, forgetting that it is not easier for the programmers, since it would include learning a new language, and that's without counting the time it would take to change the code itself.

 

And no, you will not be banned, and this has not turned into a flame yet, although it has been close, but not because of you.

Share this post


Link to post
Share on other sites
Also forgive me my English, it's not my mother language.

Actually, your English is a lot better than that of a lot of people I've met online who claim it's their primary language. (Nobody I've met on these forums falls under that category as far as I can remember however.) Just hang out on IRC for a while...

 

Anyway, back on topic. Figured it's appropriate to show my background:

 

BASIC (MS QBasic) -> Perl -> Python -> C and C++, and now I'm starting to learn x86 assembler. And right now I'm definitely one of the few fence-sitters on the OO topic.

Share this post


Link to post
Share on other sites

I learnt C and C++ at about the same timeframe in 92/93, together with modula-2 and scheme, but the latter two were not much used after this. I always was more used to the OO concept, also it was quite hard to get any OO lessons at all, as the hype started only a few years later at the university I was. But CT was only a minor subject of my studies at all, I mostly had to deal with TeX / LaTeX and markup languages like sgml and xml and later on with the languages of computer algebra systems like octave or maple, which are somewhat a mixture of imparative and functional languages mostly.

 

Later then, with a job, I had to use javascript, vbscript, php, mssql (don't know how the dialect is called) and c#. But then my interests switched towards modeling and using the uml language. If I'm in need to code anything, I prefer to use c# with the mono framework where possible, but that's just my personal preference :)

 

There are quite some other languages where I digged into, but which I have not widely used.

Share this post


Link to post
Share on other sites

Obviously, I do everything backwards :)

 

Basic, Java, Clean (functional PL), C++, Fortran 77, C, x86 asm, and now learning Python.

 

Then again, I'm not a programmer, so I can be excused ;)

Share this post


Link to post
Share on other sites

I learned Basic, then Dos, then Pascal, then Turbo Pascal...

 

Now it's 12 years later, and I don't program anymore :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×