Talk:Object-oriented programming: Difference between revisions

Content deleted Content added
Drout 0 (talk | contribs)
m Reverted edits by 212.47.240.133 (talk) to last version by Mathnerd314159
 
(29 intermediate revisions by 20 users not shown)
Line 1:
{{talk header}}
{{WikiProject banner shell|class=B|vital=yes|1=
{{Vital article|level=4|topic=Technology|class=B}}
{{WikiProject Computer science |importance=Top}}
{{WikiProjectBannerShell|1=
{{WikiProject ComputerComputing|importance=High|software=y science|software-importance=Top |classscience=By |science-importance=Top}}
{{WikiProject Computing|class=BSoftware|importance=High|software=y |software-importance=Top |science=y top|sciencecomputing-importance=Tophigh}}
{{WikiProject Software|class=B|importance=top|computing-importance=high}}
}}
{{findsources|object-oriented}}
Line 17 ⟶ 16:
}}
 
== Common Lisp ==
== Turbo Pascal 5.5 had O.O. when launched in 1989 ==
 
Common Lisp is NOT a object oriented language.You can do object oriented programming in Common Lisp (it even has its own set of operators for that: the Common Lisp Object System. Or you can write your own), but you don't have to, and most of the time, you won't need the extra garbage. [[Special:Contributions/77.171.29.82|77.171.29.82]] ([[User talk:77.171.29.82|talk]]) 23:59, 15 February 2024 (UTC)
People should include Turbo Pascal 5.5 in this article.
https://www.inf.ufsc.br/~aldo.vw/ICC/TP_55_OOP_Guide.pdf
 
:I'm a bit confused. The argument I see here is that because one can avoid doing object oriented programming in Common Lisp, Common Lisp is not object oriented. But that applies to many languages, e.g. C++ can be used procedurally (in its C subset). There is a term in the article "pure OO languages" which is defined as languages where everything is treated consistently as an object, which clearly Common Lisp and C++ do not satisfy. But the general concepts of OO seem present in CLOS. [[User:Mathnerd314159|Mathnerd314159]] ([[User talk:Mathnerd314159|talk]]) 01:18, 16 February 2024 (UTC)
<!-- Template:Unsigned --><small class="autosigned">—&nbsp;Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:Drout 0|Drout 0]] ([[User talk:Drout 0#top|talk]] • [[Special:Contributions/Drout 0|contribs]]) 22:29, 18 November 2023 (UTC)</small> <!--Autosigned by SineBot-->
 
:But all values in Common Lisp are objects and instances of some class. See for example the [https://www.lispworks.com/documentation/HyperSpec/Body/t_intege.htm integer class]. You do not have to write your own classes, still, and you can use normal functions instead of generic functions. But all classes (including structure classes made by defstruct) can be dispatched on by generic functions. I find using classes and generic functions in Common Lisp is useful and not garbage, and certainly people do use those features of CLOS, but "the extra garbage" would not be starting that discussion on the right foot. [[Special:Contributions/150.203.65.55|150.203.65.55]] ([[User talk:150.203.65.55|talk]]) 11:16, 19 March 2024 (UTC)
== Criticism on the Criticism Section ==
On that section, it was mentioned the problems with OOP. However, no one suggested the appropriate alternative to it. It was easy to criticize, but impossible to propose viable alternatives, therefore i see no purpose on the existence that section (as in: waste of time reading it).
 
== 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". [[Special:Contributions/136.223.34.54|136.223.34.54]] ([[User talk:136.223.34.54|talk]]) 15:19, 15 April 2024 (UTC)
A quote from the section sums it up: "The OOP paradigm has been criticised for a number of reasons, including not meeting its stated goals of reusability and modularity and for overemphasizing one aspect of software design and modeling (data/objects) at the expense of other important aspects (computation/algorithms)." In the light of existance of such operating systems as OS X which has employed and heavily built on Object-C from its introduction in 2000 as iOS has, the criticisms are to be easily dismissed as non-sensical.
[[Special:Contributions/77.241.195.226|77.241.195.226]] ([[User talk:77.241.195.226|talk]]) 23:15, 8 July 2017 (UTC)
: Personally I found it very interesting instead, because it led me to search for alternatives myself. But see, this is personal opinion, just as yours, and this is why that section should stay there regardless. Wikipedia should be free from controversy. [[User:Glittering Eyes|Glittering Eyes]] ([[User talk:Glittering Eyes|talk]]) 23:05, 16 February 2018 (UTC)
:I also have my doubts on the criticism section. To me, not balanced enough. There are no counter arguments to the criticisms. And also no opposing views of people who did think OOP was has been an improvement over earlier ways of programming. (Also, the claims in the section seem to be mostly theoretical and often not supported by real world evidence. Personally, I would be curious if (dis)advantages have been actually observed in practise, for example through scientific studies of software companies. But I don't know if that should be in the article.) But I don't agree that there is no point in the existence of this section though, if the amount of criticism is significant. [[Special:Contributions/2001:1C03:3A04:5300:3F7:D722:4A70:1813|2001:1C03:3A04:5300:3F7:D722:4A70:1813]] ([[User talk:2001:1C03:3A04:5300:3F7:D722:4A70:1813|talk]]) 17:03, 13 September 2023 (UTC)
 
: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. [[User:Mathnerd314159|Mathnerd314159]] ([[User talk:Mathnerd314159|talk]]) 21:43, 15 April 2024 (UTC)
True that Wikipedia should stay free of controversies but even more true that Wikipedia should stay free of personal opinions. It is fair to present criticism as long it is from authoritative and well established sources and if is well circumstantiated and researched. However opinions of bloggers, obscure authors or reddit controversies do not count as relevant criticism.
::انا اول مره [[Special:Contributions/77185.241133.195180.22619|77185.241133.195180.22619]] ([[User talk:77185.241133.195180.22619|talk]]) 2312:1543, 817 JulyApril 20172024 (UTC)
I think that currently the section on criticism is problematic because 1) some of the material it presents is circumstantial opinion and not proper research and 2) it does not present - as it is customary in well written Wikipedia articles - the responses or rebuttals to said criticism.
:@[[User:136.223.34.54|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. [[User:Stevebroshar|Stevebroshar]] ([[User talk:Stevebroshar|talk]]) 01:07, 25 October 2024 (UTC)
Overall the section reads unbalanced and biased and I very much hope that it is revised. I may have a go at a more balanced and factual take on it myself, if I can find the time.
::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. [[User:Ian.joyner|Ian.joyner]] ([[User talk:Ian.joyner|talk]]) 07:27, 25 October 2024 (UTC)
: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. [[User:Ian.joyner|Ian.joyner]] ([[User talk:Ian.joyner|talk]]) 07:21, 25 October 2024 (UTC)
 
== Criticism onsection theno Criticismlonger Sectionpresent? ==
[[User:L0g1c4p3|L0g1c4p3]] ([[User talk:L0g1c4p3|talk]]) 19:17, 2 January 2021 (UTC)
 
In the 'Real-world modeling and relationships' section, a 'criticism' section is referenced. This seems to be no longer present. [[User:BartYgor|BartYgor]] ([[User talk:BartYgor|talk]]) 07:19, 3 May 2024 (UTC)
== Out-dated sentence ==
 
:Good catch, indeed the criticism was added to the section (the Yegge quotes). [[User:Mathnerd314159|Mathnerd314159]] ([[User talk:Mathnerd314159|talk]]) 14:26, 3 May 2024 (UTC)
2nd para
== "[[:Criticism of object-oriented programming]]" listed at [[Wikipedia:Redirects for discussion|Redirects for discussion]] ==
[[File:Information.svg|30px]]
The redirect <span class="plainlinks">[//en.wikipedia.org/w/index.php?title=Criticism_of_object-oriented_programming&redirect=no Criticism of object-oriented programming]</span> has been listed at [[Wikipedia:Redirects for discussion|redirects for discussion]] to determine whether its use and function meets the [[Wikipedia:Redirect|redirect guidelines]]. Readers of this page are welcome to comment on this redirect at '''{{slink|Wikipedia:Redirects for discussion/Log/2024 November 11#Criticism of object-oriented programming}}''' until a consensus is reached. <!-- Template:RFDNote --> [[User:Tea2min|Tea2min]] ([[User talk:Tea2min|talk]]) 09:55, 11 November 2024 (UTC)
 
== OO isn't necessarily Imperative ==
Object-oriented programming is a coding foundation that makes concepts such as [[social media platforms]], [[Chat room|chat rooms]], and some other kinds of interactive [[Website|websites]] possible.
 
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. --[[Special:Contributions/81.96.108.67|81.96.108.67]] ([[User talk:81.96.108.67|talk]]) 15:30, 7 July 2025 (UTC)
Modern OOP isn't about this, anyway these sites are powered by several different technologies, and not particularly OOP. Can I delete it?
 
: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; [[NixOS|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.
[[User:Darcourse|Darcourse]] ([[User talk:Darcourse|talk]]) 13:30, 23 May 2023 (UTC)
: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. [[User:Mathnerd314159|Mathnerd314159]] ([[User talk:Mathnerd314159|talk]]) 17:43, 7 July 2025 (UTC)
 
:The cited source "Encyclopedia of Religious Rites, Rituals, and Festivals" didn't seem to have anything to do with OOP, so I reverted the change, same in the article for [[Chat room]]. [[User:NetCuRLi|NetCuRLi]] ([[User talk:NetCuRLi|talk]]) 09:51, 25 May 2023 (UTC)