Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 26th, 2006, 3:08 PM   #21
Soulstorm
Hobbyist Programmer
 
Soulstorm's Avatar
 
Join Date: Jan 2006
Location: Menidi, Athens, Greece
Posts: 243
Rep Power: 3 Soulstorm is on a distinguished road
Quote:
. No, I know how to use classes have used them, very successfully, but I just can't find a very pratical use for them. Most of the stuff I've doing lately is proof of concept for work. They ask for quick, code. They don't want me to fill it with anthing that distracts.
I thought the entire concept of OOP was discovered and adopted by so many languages (and programmers that use them) just because they were needed in large programs. 'quick code' doesn't necessarily mean 'code without classes', far from it. In many cases it means 'class-based project'.

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)
Soulstorm is offline   Reply With Quote
Old Jun 26th, 2006, 3:33 PM   #22
Dragon_Master
Programmer
 
Dragon_Master's Avatar
 
Join Date: Jan 2006
Location: Some where
Posts: 74
Rep Power: 3 Dragon_Master is on a distinguished road
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)
Dragon_Master is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:37 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC