![]() |
| ||
| Object Oriented Programming Hello everyone. What are the disadvantages/shortcomings of object oriented Programming?:eek: |
| ||
| Re: Object Oriented Programming Quote:
Google provided a ton of results..... here is just the first hit: http://wiki.tcl.tk/13398 |
| ||
| Re: Object Oriented Programming @ TylerSBrenton: If (s)he asked, you should at least have the common curtosey to provide an answer that isn't a google result. @ sosina abraha: There are two branches of programming: functional, and object-oriented. Functional languages leave the entire language at your disposal without having to import other "classes". The problem that arises with functional languages, is that you end up re-typing out code again and again. For instance, let's say you're creating a program that requires networking protocols like TCP/IP and HTTP. So, you spend the time writing the program, and it works perfectly. Now, you go to write another program, some time later, and you require the TCP/IP and HTTP protocols this time. You are going to find yourself re-typing or copy-and-pasting the code from the old program - this can prove to be time consuming, and perhaps even cause big errors in the code. Also note, most functional languages, are scripting languages. Now, with Object Oriented Programming approaches code importing a little differently. In Java, let's say, you have the option to just use the standard code base, which can keep small programs neat and tidy. But for larger applications, it starts turning into a functional approach to things - and not to mention, some things in Java just aren't possible without importing some classes. Object-Oriented Languages make use of "objects", "classes", "inheritance"...things like that. A class is an object definition, and an object is a creatable/destroyable instance of a class - it's a roundabout definition, but it's the best I can do for the moment. Inheritance allows other classes to keep their inherent functions (or, as Java-heads call them, "methods"), and expand on the number of methods available to the user through that one class. For more on this, Wikipedia is always a good reference, and if you would like to get into Object-Oriented Programming, Java would be a good place to start - it teaches you what you need to know about OOP, and without the complexities of operator overloading and pre-processor calls inherent in C++. |
| |||
| Re: Object Oriented Programming Quote:
Quote:
Quote:
You might also consider Python, Ruby, or Smalltalk if you're wanting to try an OO language. Java is widely used, but it's certainly not the flagship language for the OO paradigm... |
| ||
| Re: Object Oriented Programming Quote:
|
| ||
| Re: Object Oriented Programming From the way I was tought things, function programming is synonymous with procedural programming. As for the "complexities" of operator overloading and pre-processor commands, I consider those complexities, because if you overload an operator, and you are developing a large application, the operator overloading can be lost in the lines, and become a serious source of frustration - something I've experienced in the past, and which has led me to keep away from C and C++. As for pre-processor commands, I just don't see a point for them aside from incorporating header files. I'm a Lisp (primarily), Python, Perl, Java, BASIC, Expect and shell programmer by trade, and am learning Linux-based x86 assembly - all languages which have no imminent focus on pre-processor calls. I know I didn't provide a complete definition of Object-Oriented Programming, but I got the ball rolling, and provided the OP with a direct link to information (Wikipedia), instead of just a "just google it" response. Quote:
|
| ||||||
| Re: Object Oriented Programming Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
@OP: Sorry for the hijacking. As to your question, the drawbacks from OOP typically relate to system design, when an OO model doesn't match your data organization. There might also be issues if you need low level code, such as a kernel, since an OO model is done at a level with the hardware abstracted away. |
| ||
| Re: Object Oriented Programming Lisp can be used very much like a OO language, just as C can be used like a Functional language with the correct libraries. But the framework and libraries included are Functional for Lisp and Procedural for C and the languages (as I would assume) are grouped according to to the norm. Regards, Tyler S. Breton |
| ||
| Re: Object Oriented Programming Types of programming paradigms (note I am not saying types of Programming languages):
Quote:
Quote:
One of the disadvantages of Object Oriented programming I can think of is clubbing the program to death by overusing the abstraction mechanism. As said by someone "Object oriented programming is actually writing simple programs the complicated way." |
| ||
| Re: Object Oriented Programming Lisp certainly is object oriented, if that's what you want. With Lisp's macros and lexical scoping, you can do anything. Common Lisp was the first ANSI-standardized object oriented language, ever. Common Lisp is not really a 'functional' programming language, it's a language that lets you program the way you want. It has variables that you may modify -- that are mutable -- so you can use it in a brain-dead manner the way you would use C. You could also choose not to modify your variables, and you have lexical scoping, which means you can use it in a functional manner. Scheme is better at that, though, since CL is kind of weird with its 'apply' and whatnot. Lisp certainly is better for object oriented programming than, say, C++ or Java, in the general sense. The best language for programs that need to retain state, though, is Haskell, IMO. No other language handles state transformation in a better way. None that I've heard of. Object orientedness is really about having objects pass messages to one another. The purpose of inheritance in languages like C++ is to allow for a form of dynamic typing. Object oriented is really a subset of what Lisp offers, since an object is nothing more than a function that takes some finite enumeration of method names as its first argument, along with a list of further arguments. Common Lisp has more explicit object orientation, with classes and the like. |
| All times are GMT -4. The time now is 8:11 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC