![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#21 | |
|
Hobbyist Programmer
Join Date: Jan 2006
Location: Menidi, Athens, Greece
Posts: 243
Rep Power: 3
![]() |
Quote:
I really couldn't imagine how things would be without OOP. A vast majority of the elements in the OS's you are using in your profile are designed using OOP. OS X is entirely based on Objective C classes (the foundation framework and Cocoa-the descendant of the primary OOP framework used in NEXTSTEP). You cannot write Cocoa programs (in Obj-C) if you don't have a strong OOP background (imagine that in 99% of the cases the main() comprises of the 'return' statement only-the real code is in the Cocoa Classes that you write) Recently I found myself looking at old programs that I had made (when I first started learning programming) using procedural programming concepts. I rewrote them using classes, and the code was 60% less lines than the original program. OOP also produces *much* cleaner code. It is much easier to read by others than procedural programming, and by you. That means productivity, because you can implement more things easily without changing many parts of your code. And, you use classes, even if you have forgotten that you do. The entire iostream library, is an object oriented library. Also, when you use the STL, you are using nothing more than a huge library that has predefined classes in it with overloaded operators (and an object-oriented memory management system). OOP is everywhere in C++, and if you don't see any reason of using classes in C++, I'm surprised that you use this language (I saw that in your profile), and not just remain to plain C. Without OOP, I don't see any reason you would need to program in C++. And allow me to disagree with the last sentence of the quoted post: Is OOP distracting? It distracts you from what? And why any employer would ask programming to be not Object Oriented? I thought employers ask for these kinds of things, not avoid them. ...but that's just my opinion :o
__________________
Project::Soulstorm (personal homepage) |
|
|
|
|
|
|
#22 |
|
Programmer
Join Date: Jan 2006
Location: Some where
Posts: 74
Rep Power: 3
![]() |
You sound like my friend Nathan... No, I don't program for OS X. I do use OOP, but I don't see a point for it in the programs I make. (most of the time I can cut them down to 2 functions or less) and they are still long. I don't need other people to be able to read my code. I don't use iostream often. (because I use windows API) Yes, OOP is good. I like it, but I don't use it often. It's just not practical for me. However, when I make games, and alot more professional programs, you bet your ass I use OOP. It makes things easier, and more effient, but if you've read C/++ books ( I am sure you have) they tell you that, if you don't need classes, don't use them, or they'll just make things harder. That's exactly what I do. I meant to say: recently, I have had no need for classes. I understand them fully. As well as have used them for the last 20 years. Just because I haven't used them recently doesn't imply that I'm a novice. In fact I have several degrees in programming. (Including a certification in C)
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|