Talk:Class (programming)
| This is the talk page for discussing improvements to the Class (programming) article. This is not a forum for general discussion of the subject of the article. |
Article policies
|
| Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
| Archives: 1 |
| This article is rated C-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||
A class is..
[edit]It says: a class is an extensible program-code-template for creating objects. Isn't that a retarded way, using too many words? Of course it's extensible and do we have to say "program-code-template"? Isn't it good enough to say it's a "template for creating objects"? Why do you have to be so anal about it? — Preceding unsigned comment added by 88.95.4.170 (talk) 10:00, 9 August 2020 (UTC)
- I suggest you review the Five Pillars of Wikipedia especially Civility. This isn't the comment section on YouTube. I agree the intro could be better but I don't think that removing "extensible program-code" is an improvement. Of course any competent technical person knows all that but the introduction of an article is meant to be for as general an audience as possible. Some non-technical people coming to this article may not know that Class as typically used in IT today means code or that one of the key values claimed for using a class rather than say just an abstract data type is that classes are meant to facilitate reuse and maintenance (i.e., be easy to extend). I'm going to check some of my books and see how they define a class and if I can find a better definition I will change it but I think just removing those words would not improve the article. One last thought: we need to be careful not to just confine the definition to programming languages. Knowledge graphs are a concept that is starting to play a big role in how people organize big data and the concept of class in the Web Ontology Language (OWL) and RDFS is essential but those aren't programming languages they are data definition languages. --MadScientistX11 (talk) 16:17, 9 August 2020 (UTC)
- First, I take back what I said above about OWL and RDFS. I forgot this article is about OOP and the concept of an OWL/RDFS class is covered in other articles. I looked at several books: Jacobsen's Object-Oriented Software Engineering, Bertrand Meyer's Object-Oriented Software Construction, and Goldberg's book Smalltalk-80 and all of their definitions of class are already highly technical (built on the various concepts they use to introduce the reasons for OOP such as modules and encapsulation) and I think less appropriate for the intro of the article. I also checked the one source given that is available online (source 2) and the language there is very close to what is written (without being a direct copy). So I'm leaving it as is. If anyone changes it please make sure to document your reasons in the talk page. Thanks. --MadScientistX11 (talk) 17:40, 9 August 2020 (UTC)
- I plan to change it :) ... to be less awkward; to be easier to understand for the layperson ... while still correct in the eyes of the seasoned practitioner. In particular, program-code-template is not a thing and needs re-wording. I think the article intro is correct, but poorly worded. I plan to keep the jist as-is; with better wording. Stevebroshar (talk) 15:09, 21 June 2024 (UTC)
- First, I take back what I said above about OWL and RDFS. I forgot this article is about OOP and the concept of an OWL/RDFS class is covered in other articles. I looked at several books: Jacobsen's Object-Oriented Software Engineering, Bertrand Meyer's Object-Oriented Software Construction, and Goldberg's book Smalltalk-80 and all of their definitions of class are already highly technical (built on the various concepts they use to introduce the reasons for OOP such as modules and encapsulation) and I think less appropriate for the intro of the article. I also checked the one source given that is available online (source 2) and the language there is very close to what is written (without being a direct copy). So I'm leaving it as is. If anyone changes it please make sure to document your reasons in the talk page. Thanks. --MadScientistX11 (talk) 17:40, 9 August 2020 (UTC)
- Agree with @MadScientistX11 about civility. In particular, the r-word is considered poor taste in general. I have in the past made harsh judgments of article content. But, I usually regret it. Let's all try to rise above. ... I agree that program-code-template is odd. Use of dashes makes it seem like that is a common term, but it's not. A class is code and it is a template. So, let's say something like "a class is source code that acts as a template for objects". Stevebroshar (talk) 15:01, 21 June 2024 (UTC)
Short desc is wrong; run-on paragraphs
[edit]WRT short desc: Specification of [a] object structure That is not correct (enough) IMO. An object is both structure and functionality. Therefore a class must specify both. Previously, I changed the desc to specifies an object so that it covers both ... all aspects of an object. If we _must_ mention structure ... then we should also mention functionality. I think it was fine before. It either needs to also mention functionality or to not mention structure.
You shoved unrelated sentences together to make a run-on paragraph. I know that WP articles (all writing for that matter) are not suppose to have lots of short paragraphs, but it's better to have short paragraphs than run-on paragraphs IMO.
A paragraph should have one idea. As-is, the first paragraph has 4: Definition, creation, members and inheritance.
For reference: In object-oriented programming, a class defines the structure, initial state and behavior of an object. An object is created through a process known as instantiation, the creation of an instance of a class. Classes may define members, such as methods and variables, that are local to either the class itself or instances of that class. If the programming language supports inheritance, a class is extensible by allowing the definition of one class to be based on and extended from another. Stevebroshar (talk) 13:56, 28 June 2024 (UTC)