| | |
Object Oriented Programming
Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
![]() |
•
•
•
•
Hello everyone.
What are the disadvantages/shortcomings of object oriented Programming?:eek:
Google provided a ton of results..... here is just the first hit:
http://wiki.tcl.tk/13398
Western New England College '08
Computer Science
Programming Lang's:
C, C#, Java, Lisp, MASM, Visual Basic 6
Computer Science
Programming Lang's:
C, C#, Java, Lisp, MASM, Visual Basic 6
@ 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++.
@ 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++.
Last edited by indienick; Jan 22nd, 2007 at 3:37 pm.
Angel-headed hipsters burning for the ancient heavenly connection, to the starry dynamo in the machinery of the night.
-Ginsburg
Don't tell me to "google it" - I already have.
-Ginsburg
Don't tell me to "google it" - I already have.
•
•
•
•
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.
•
•
•
•
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++.
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...
Last edited by TylerSBreton; Jan 22nd, 2007 at 4:26 pm.
Western New England College '08
Computer Science
Programming Lang's:
C, C#, Java, Lisp, MASM, Visual Basic 6
Computer Science
Programming Lang's:
C, C#, Java, Lisp, MASM, Visual Basic 6
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.
Lisp is object-oriented, but not forcefully object-oriented, like Java. :cheesy: Not to mention, Lisp prides itself on not locking itself down to one solution per problem.
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.
•
•
•
•
Functional programming langauges (e.g. Lisp...
Last edited by indienick; Jan 22nd, 2007 at 7:32 pm.
Angel-headed hipsters burning for the ancient heavenly connection, to the starry dynamo in the machinery of the night.
-Ginsburg
Don't tell me to "google it" - I already have.
-Ginsburg
Don't tell me to "google it" - I already have.
•
•
•
•
From the way I was tought things, function programming is synonymous with procedural programming.
•
•
•
•
Originally Posted by Wikipedia
Functional programming is a programming paradigm that conceives computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming emphasizes the application of functions, in contrast with imperative programming, which emphasizes changes in state and the execution of sequential commands.[1]
•
•
•
•
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.
•
•
•
•
Lisp is object-oriented, but not forcefully object-oriented, like Java. :cheesy: Not to mention, Lisp prides itself on not locking itself down to one solution per problem.
@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.
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
Regards,
Tyler S. Breton
Western New England College '08
Computer Science
Programming Lang's:
C, C#, Java, Lisp, MASM, Visual Basic 6
Computer Science
Programming Lang's:
C, C#, Java, Lisp, MASM, Visual Basic 6
Types of programming paradigms (note I am not saying types of Programming languages): You can always use packages...
Object oriented and Funtional programming are two different paradigms altogether. Saying LISP is object oriented would be completely wrong.
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."
- Imperative - C, Ada, Pascal, Modula 2
- Functional - LISP, FP
- Aggregate - SQL, Mathematica
- Concurrent - SR, Lynx
- Dataflow language - Val, Sisal, Post
- Declarative - Prolog, Godel
- Object Oriented - C++, Java, C#
•
•
•
•
Originally Posted by indienick
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.
•
•
•
•
Originally Posted by indienick
Lisp is object-oriented
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."
I don't accept change; I don't deserve to live.
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.
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.
Last edited by Rashakil Fol; Jan 23rd, 2007 at 9:06 pm.
All my posts may be redistributed under the GNU Free Documentation License.
![]() |
Similar Threads
Other Threads in the Computer Science Forum
- Previous Thread: Lisp Programming defparameter
- Next Thread: Final Year Project! Please help!
| Thread Tools | Search this Thread |
ai algorithm algorithms amazon assignment assignmenthelp assignments automata battery bigbrother binary bittorrent bizarre blogging bomb business cern codebreaker compiler computer computers computerscience computertrackingsoftware connect conversion data dataanalysis dataintepretation development dfa dissertation dissertations dissertationthesis dissertationtopic ebook employment energy extensions floatingpoint foreclosure foreclosuresoftware fuel gadgets geeks givemetehcodez government graphics hardware homeowners homeworkassignment homeworkhelp humor ibm ideas internet iphone ipod itcontracts jobs kindle laser laws linkbait lsmeans mainframes marketing mobileapplication msaccess nano netbeans networking news os p2p piracy principles programming rasterizer research sam-being-cute science security sex simulation software spying sql stephenfry study supercomputer supercomputing sweden technology textfield turing turingtest two'scompliment uk virus ww2






