Talk:Object-oriented programming
This is not a forum for general discussion of the subject of the article.
- Put new text under old text. Click here to start a new topic.
- New to Wikipedia? Welcome! Learn to edit; get help.
- Assume good faith
- Be polite and avoid personal attacks
- Be welcoming to newcomers
- Seek dispute resolution if needed
| This level-4 vital article is rated B-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||||||||||||||||
WikiProject icon This article is within the scope of WikiProject Software , a collaborative effort to improve the coverage of software on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.SoftwareWikipedia:WikiProject SoftwareTemplate:WikiProject Softwaresoftware Top This article has been rated as Top-importance on the project's importance scale. | |||||||||||||||||||||||||||||||||||
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL
We could write this more simply
I'm taking an entry-level computer class and I can't make heads or tails of this article. Procedural programming seems simple but I don't know what the teacher means by "objects". 136.223.34.54 (talk) 15:19, 15 April 2024 (UTC) [reply ]
- OOP is complex and vague - it is hard to discuss it concisely. I think the article structure is about as good as it gets. But you are right that the "objects" section does not define objects, I have added a definition. Mathnerd314159 (talk) 21:43, 15 April 2024 (UTC) [reply ]
- انا اول مره 185.133.180.19 (talk) 12:43, 17 April 2024 (UTC) [reply ]
- @136.223.34.54 i agree. this article is written poorly. OOP Is not a complex and vague topic as other says. people make it more complicated than it is. Stevebroshar (talk) 01:07, 25 October 2024 (UTC) [reply ]
- That is a problem with WP. Perhaps articles are written by subject experts who are used to talking with other subject experts and put things in terms that others can't understand.
- Or maybe it is that so many make amendments it becomes an unintelligible mess, like C++.
- Or maybe it is because of things like C++ and UML that OO itself has become this mess that it should not be. Ian.joyner (talk) 07:27, 25 October 2024 (UTC) [reply ]
- OOP helps organise projects, but in a disciplined and mathematical way. You should read Object-Oriented Software Construction. This is true and clean OO, but not one that simplifies the most sophisticated aspects of OO or programming.
- An object, in itself is a self-contained computer that handles one kind of data. Objects interact via messages.
- Don't get misled by horrors such as C++ or UML. Ian.joyner (talk) 07:21, 25 October 2024 (UTC) [reply ]
The redirect Criticism of object-oriented programming has been listed at redirects for discussion to determine whether its use and function meets the redirect guidelines. Readers of this page are welcome to comment on this redirect at Wikipedia:Redirects for discussion/Log/2024 November 11 § Criticism of object-oriented programming until a consensus is reached. Tea2min (talk) 09:55, 11 November 2024 (UTC) [reply ]
OO isn't necessarily Imperative
While it's certainly commonly the case that OO languages are mainly imperative in nature as well, it's by no means necessary; the paradigm itself says nothing at all about how methods are implemented, and having everything be pure functions would be paradigmatically compatible. (Indeed, there are significant sub-hierarchies of purely read-only classes in some programming languages' standard libraries.) There have even been languages that have been definitely functional OO languages, though they've never caught on widely. OO is about how the operations and the data are associated with each other, and not whether the operations can modify any input state.
Every time I read articles that continue to mix these things up, it hurts. --81.96.108.67 (talk) 15:30, 7 July 2025 (UTC) [reply ]
- You're right that object-oriented programming, as a paradigm, doesn't require imperative semantics. In principle, it's entirely possible to design a purely functional object system with immutable fields and pure methods. That said, OOP as it has historically developed—and as it's understood in most mainstream contexts—grew out of imperative programming and remains closely tied to it. Most widely-used OOP languages—Java, C++, Python, Ruby—are deeply imperative. Even in functionally influenced languages like Scala, OCaml, or F#, mutation remains a core part of the object model, even if immutability is encouraged. The current article reflects this association.
- Meanwhile, I'm not aware of any widely-used languages that implement a purely functional object system and identify themselves as object-oriented. OOHaskell involves mutable fields; Nix has object-like inheritance structures but doesn't describe itself as OO. So while the paradigm doesn't demand imperative semantics, its practical manifestations nearly always involve them.
- It would be great to include examples of exceptions in the article for balance, like with the subsection on Go leaving out inheritance, but without any clear, well-known examples, it's hard to argue the imperative association is optional. Mathnerd314159 (talk) 17:43, 7 July 2025 (UTC) [reply ]
- Personally, I disagree with structuring procedures as objects, because objects are clearly meant to abstract entities, not functions or functionalities.
- I’m not sure whether you’re referring to the literal description or to how it doesn’t seem object-oriented, but if it’s the first case, that’s not really a good argument:
X doesn’t describe itself as OOP
- The fact that something doesn’t describe itself as such doesn’t mean it isn’t. There could be an unconscious bias in whoever describes it—just as I might have one myself right now. QuantumNinus (talk) 15:37, 11 November 2025 (UTC) [reply ]
- See [1] for an example of a purely functional object system. The claim is simply that experiments like these are too obscure to make Scheme itself an OO language. It's like if someone said if you paint an apple orange, it turns into an orange. It doesn't - they're both fruits, but there are too many inconsistencies in attributes between the apple-painted-orange and an actual orange to call the apple-painted-orange an orange. Mathnerd314159 (talk) 16:08, 11 November 2025 (UTC) [reply ]
The description "based on objects" seems incorrect.
This is a historical problem; the definition/description of this paradigm as object-based has nothing to do with OOP itself. Object-oriented programming deals with inheritance; although OOP uses both the object-based and class-based paradigms, this does not make it a type-of (is-a) of OB and CB. The others exist independently of OOP, even if OO uses them.
There are earlier languages already based on objects and classes, for example, CLU. Furthermore, although Barbara Liskov described CLU as an object-oriented programming language, that was merely a syntactic description — the semantic meaning is clearly different from typical OOP. She also made it clear what she personally considered to be an object-oriented sense. But again, she attributed her own interpretation to the concept of OOP. (talk) 15:17, 11 November 2025 (UTC) [reply ]
- So per the article:
- Bjarne Stroustrup (author of C++) said "OOP does not need inheritance"
- Go says it is an OOP language despite not having inheritance
- In the earliest setting, MIT, objects were just "LISP atoms with identified properties (attributes)" - no inheritance.
- If you have sources stronger than these that "object oriented programming deals with inheritance", let's see them. Mathnerd314159 (talk) 15:59, 11 November 2025 (UTC) [reply ]
- Yep, you’re right. I used to think object-orientation existed only when inheritance was present. Even the Object (computer science) entry treats OO as involving inheritance, so that entry also needs revision.
- But the concepts of class-based programming and object-based programming are not subtypes of OO. Aparentelly, they don’t differ fundamentally from OOP — one simply includes more features than the other, but there’s nothing truly new that would make them a distinct type.
- They are only minor variations. Inheritance, for example, would be a better sub-type of OO than the class-based and object-based paradigms. QuantumNinus (talk) 22:44, 11 November 2025 (UTC) [reply ]
- B-Class level-4 vital articles
- Wikipedia level-4 vital articles in Technology
- B-Class vital articles in Technology
- B-Class Computer science articles
- Top-importance Computer science articles
- WikiProject Computer science articles
- B-Class Computing articles
- High-importance Computing articles
- B-Class software articles
- Top-importance software articles
- B-Class software articles of Top-importance
- All Software articles
- All Computing articles