|This is the talk page for discussing improvements to the Object-oriented programming article.|
|Archives: 1, 2, 3|
|Object-oriented programming has been listed as a level-4 vital article in Technology. If you can improve it, please do. This article has been rated as C-Class.|
|WikiProject Computing / CompSci||(Rated C-class, Mid-importance)|
OOP with ANSI-C
"ANSI-C is a full-scale object-oriented language" Object-Oriented Programming With ANSI-C by AT Schreiner - 1993
It would be nice to have a section on OOP techniques in non-OOP languages.
Overview is misleading
The overview seems to confuse OO with modularity and encapsulation. Although this is a common mistake by beginners, who tend to extrapolate from a small exposure to different languages, we should aim for more precision. In addition there is plenty of weaseling about. Other things like run-time checking of data is by no means typical of OO. Reusability has been a goal of many software technologies, and it's far from clear that OO is any more successful than others.
Perhaps the overview should just be discarded, and a summary of the current situation could be added to the history section, which I think is much better? — Preceding unsigned comment added by Ketil (talk • contribs) 13:15, 28 April 2011 (UTC)
- I'm not a beginner and I think OO absolutely IS all about encapsulation and modularity. If it's not about that what is it about? MadScientistX11 (talk) 01:00, 10 December 2013 (UTC)
"Code gallery" section
Removed completely misleading and bogus non-example of OOP from the so called "Code gallery" section. It was a complete mess, the only member of the "gallery", written in an unspecified language, doing unspecified things in a manner foreign to OOP. Whatever unspecified purpose it might have had, the code was perfectly capable of crippling anyone's grasp at OOP for a considerable amount of learning time. Until a less harmful example is found, I think the article is better off without it for the time being.
Lisp is not OO
Currently the article says: "Languages with most of the features of objects (classes, methods, inheritance, reusability), but in a distinctly original form" and includes Lisp as such a language. Common Lisp had none of this except reusability which pretty much every language strives to deliver. There were lots of extensions to Lisp (e.g. Flavors, CLOS) that were OO but the base language definitely was not. I'm going to change this. MadScientistX11 (talk) 00:47, 10 December 2013 (UTC)
- I just noticed this is said in the History section as well, claiming that Common Lisp is an object-oriented language. Common Lisp WITH CLOS is an OO language but common Lisp or most Lisp dialects are FUNCTIONAL programming languages not OO. I'm going to change the history section to take out the claim that Lisp (without CLOS) is OO. MadScientistX11 (talk) 18:06, 11 December 2013 (UTC)
- Object orianted programming originally was simply programming with objects. This article is more about encapsulation then objects. And most of what is not about objects or the automation of object creation district. management.
- In common lisp every thing is an object. Even the program. There was not all this specific limits set on object orianted languages. I can not see were lisp is not an objected orianted language. There is no data or program element that are not objects in the lisp language. A list element can be an atom or a list. Both are dynamic objects. An atom is an object that is dynamically allocated and released. Lists are also dynamically allocated and released. Every thing in lisp is a dynamically allocated and released object including programs.
- EVERY THING IS AN OBJECT IN LISP. THAT SEAMS PRETTY FRAKEN OBJECT ORIANTED.
- This topic is including cryteria outside of the basic object orianted concept. Lisp can process it's own code which is a lisp object. Code is stored in a list.
- Lisp is more object orianted then any other example given in this artical.
- This topic should cover all forms of object orianted programming current and historical. Historically there published papers and books with different views.
- Now with this curent definition of OOP. What as a language in which everything is a dynamic object. Except program code. Say a procedural language in which all variables may contain any data type. All data is contained in objects that carry their type. A variable X may contain an integer at one point or1 a string another. An object is addressed by the variable containing it. These are high over head objects as the validity of most operations must be checked at runtime. How would LISP 2 be classed to day. In 1970 it was called an object language.
.FOR X .IN Y .DO .IF X:INTEGER .THEN .... .ELSE .IF X:FLOAT .THEN ... .ELSE .IF X:STRING .THEN ...
- In the above code snippet we have for loop iterating through a list's elements and processing each ellement depending on its type. Not sure of exact type names any more. LISP 2 was implemented at SDC in the late 60's. The above is a dialect used in the CWIC compiler compiler. Research has shown the stand alone LISP 2 had typed and un-typed variables.
- Steamerandy (talk) 03:44, 1 March 2015 (UTC)
C++ obkects with operator overloading simply makes it an extendable language.
Object oriented programming is hard to pin down.
I think there several types of object oriented programming.
One is the old definition of which lisp is an example. In this class of oop an object carried it's type with it. Variables were nutral as they usually were a pointer to an object. These were usually list processing languages.
Then came the structured data object languages. COBOL falls into that class. Records and items could be copied. This class of OOPs directly manipulat container objects. Pascal is another example.
The third generation is C++ (operator overloading) being able to define operations on defined opjects. Making a string operation and defining + to be string concatenation. Defining object ts based on objects.
But a general object that are in a way language independent are the Windows interface objects. Here we have an object thet implements functions that effect the object and call back functions that report those changrs.
Object oriented programming had been applied to so many things over the years it's hard to define what it really means. The ones I listed are just the stand outs I remembered.
The Window interface object is not all that different then a lisp object.
A good example of curent thinking is the Windows interface. Here we have objects with defined actions and reporting methods. I wouldn't exclude the older ones as the are historically significant. Steamerandy (talk) 00:31, 28 January 2015 (UTC)
- There are no objects in the true OO sense in basic Lisp. There are structures but not true objects in the OO sense. However, Lisp is so easy to extend that many OO languages: Flavors, LOOPS, KEE, CLOS have been built on top of it. I'm not sure what you mean by Windows objects vs. Lisp objects. Are you talking about Windows as an OS or Windows as a UI paradigm that can (and almost always is) modeled and implemented using OO modeling and programming? --MadScientistX11 (talk) 01:24, 28 January 2015 (UTC)
- BTW, I disagree that COBOL or Pascal are Object Oriented. There is a standard definition of object-orientation and it requires inheritance, polymorphism, and message passing. Now, if you are saying that you can get many of the same advantages of OO using a procedural language like COBOL and just following good design practices I agree with that. In fact when I used to give talks to programmers who knew COBOL I used to say the same thing. I actually would like to add more detail along those lines to the article, I had a boss who used to really drill that into us, that OO was just a natural evolution of things that good developers had been doing at least since structured programming and I completely agree. The problem is my saying "this very bright guy I knew who used to be a lead scientist at Bell Labs said..." doesn't count as a reference. If you can find some good references for that idea feel free to edit the article or just leave the refs here and I will edit it. --MadScientistX11 (talk) 03:57, 28 January 2015 (UTC)
I have been programming for 40 years and I do not know what a programming paradigm is. I have read the Wikipedia explanation but that does not help. I have never heard the term used in this context. There has got to be a more useful and relevant term to define what OOP is. Sam Tomato (talk) 22:59, 27 January 2015 (UTC)
- If you google "paradigm" the first definition is: "a typical example or pattern of something; a model." or if you look at the Wikipedia definition of paradigm it is: " a distinct concept or thought pattern." So, it's a model or pattern for programming. Beyond that I'm not sure what to say paradigm is such a common term in science and engineering it seems like a perfectly acceptable way to describe it. Surely you've heard the term "paradigm shift" in relation to science? It's the same idea, going from one model of how to analyze or solve problems to another. The idea is that the essential problem (describing how the solar system works for example) is still the same but the model or paradigm used to solve it (Netwonian => Relativity) is the thing that changes. Other programming paradigms would be: functional programming, structured programming, etc. --MadScientistX11 (talk) 01:19, 28 January 2015 (UTC)