hi guys...
when having the choise to select between a procedural and an OOP coded *.lib, with some nice functions inbuild... what lib would you like to use? The procedural or the OOP based one? (The OOP based lib could be available for procedural coding use too)
Thanks in advance for you votes / opinions...
with me working in cpp and not so much in c i would say oop.
it just has so many advantages over standerd procedural code. and as you say you could use an oop lib in procedural code although it's a bit ugh.
What's the difference? Use the most suitable one/one that works. It shouldn't affect your own code.
Jim
thanks for feedback... i just want to know how you guys think about procedural and OOP based code/libs... i am starting learning C/CPP coding atm (first wihout OOP i think)... Is there any big different to code procedural or OOP? (more/less code, easier/harder to code, speed?) As far as i know using OOP will be 4 bytes more for each function, but this is not an issue for me. I think in future i will try to learn and understand OOP... first i have try to learn and code C/CPP things like the 1k i started and released at BP
well, i am a procedural programmer so i guess procedural for me.
oop code has a lot of advantages though, namely that your code becomes very portable and much easier to adapt.
For instance, if someone wrote an object to do a task, it can be easily imported by another programmer who wanted that object without the second programmer even needing to change anything.
I would say that if you are making anything significant then you should definately use oop.
Start off learning procedural stuff first, va!n. You
already know purebasic - so writing some c functions
isn't that hard. Especially when your aim is writing
tiny (1k) productions.
Generally speaking if you want to become a software
architect - there is nearly no way of avoiding OO
design (jaja, I know there is always an exception from
the rule).
So in that case - it would be really useful for you to
learn the object orientated part of C++ (or altenatively
choose an easier way like Java, C#).
I could write a library in Common Lisp for all your app cares. It wouldn't mean you had to write your app in CLisp.
If you code in C++ or the lib uses C or C++ runtime library you will have a much bigger problem crunching in to 1Kb - the C++ compiler is more likely to use built-in stuff that you would need to emulate if you remove the libs, eg. new and delete.
QuoteAs far as i know using OOP will be 4 bytes more for each function
I wouldn't say there's any hard and fast rule. Calling a function in a class means possibly one extra instruction, but it might get optimised away.
If you want to code commercially, you need OO skills. C++, C# and/or Java. (C# rocks, by the way). If you want to be a web designer and code Javascript, you might get away without.
Jim
OOP is supposedly "The Way of The Future."
I don't know if I could easily adapt to procedural. I would have to have some sort of monotone compiler running on a yellowing computer with some sort or rainbow colored apple on the side.
the question about OOP or procedural coding, is just in generall... 64k intros, demos, games... so thanks for your feedback. For 1k and 4k coding i think i will use no OOP... Now i will try to find some easy (for total beginners) and good (best in german) tutorials showing how to use/code Win32 API and OOP.
Petzold is the Windows programming bible.
http://www.google.com.au/search?hl=en&q=petzold&meta= (http://www.google.com.au/search?hl=en&q=petzold&meta=)
When I was at university, I bought a book called 'Standard C' by P.J.Plaugher and J.Brodie. I recommend that too. It was a very technical book, but it specs C to you enough to write anything and it has the library reference too. It was enough for me to become an adequate C programmer, becoming an ace C programmer has taken another 15 years :P
Jim
@Jim:
Thanks for the info... i bought this book now and i will check out if there are some other petzold books i should buy to learn C/CPP with Win32 API and OOP:
(http://bookshop.gfu.net/AxCMSTemplates_GFU/pics/products/3860631888.jpg)
@va!n:
I have this book, too. Covers nearly everything
about WinAPI programming. Good for basic under-
standing but very focused on standard WinAPI.
(well do not know how updated it is - mine is nearly
10 years old or so).
I love the excessive length of some German words. Also, I see that the book fits the general "look" of a programming book.
A good programming book will have one of two cover styles.
a. The cover contains abstract geometrical figures.
b. The cover has a black and white picture of an animal totally unrelated to the language in question.
Based on those two criteria selection is a breeze.
:clap: