Talk:Class (object-oriented programming)

message: This discussion is getting too large to read. Isn't it possible to have a short summary and hyperlinked to it the rest of the arguments ?
It is a shame that choice of wordings is hiding more fundamental aspects that I wanted to propose to modify.
I'd like to propose the use of a simpler and more consistent vocabulary (as in Smalltalk).
     Class    is like an abstract datatype.
     Object
     Instance = object       ; inherits from aClass.
     Class defines variables ; = state variable
           defines methods   ; = piece of code = behavior. 
Please do not call methods subprograms. In the Wikipedia class definition, "function" is used. I much prefer that. But I'll agree that we can put functions, subprograms and methods in the same bag for generalists.
This for starters.  It would also be nice if the rest of the description would use the same minimal vocabulary in order to have a consistent discource.
I am available for constructure discussions
Cheers
--[--René TheJoker Bach 16:33, 5 Nov 2004 (UTC)
thread_title:  Discussion structure 

message: I was trying to get a sense of what the introduction of this entry was saying. I really had to dig around to understand it. There is a lot of good information, it just seems like if it was put together a little more elegantly that the knowledge could be conveyed a bit more cleanly and efficiently. --Remi0o 06:14, 20 December 2006 (UTC)
thread_title:  Marked as Confusing 

message: It seems to me that there is a strong conceptual link between the idea of a class in OOP and the mathematical idea of a Class (set theory).  Classes in OOP can be thought of as a collection of varius kinds of data along with the operations (methods) that are ordinarilly performed on that data.  The set theory version of a class is basically the same as far as I can tell. For instance, the real numbers are considered to be a class (where class is the most general name that can be given to the abstract mathematical concept that is real numbers - more specifically they can be considered to be a set, or even a field), and the standard operations such as addition, subtraction, etc. are understood to be associated with the class of real numbers as well. Is it possible that this is where the OOP name for class came from? If so, that might be worth adding to the article somewhere. Juanquij0te 09:48, 7 January 2007 (UTC)
thread_title:  Set Theory 

message: The article for "method (computer science)" uses these words: "In object-oriented programming, the term method refers to a piece of code that is exclusively associated either with a class (called class methods, static methods, or factory methods) or with an object (called instance methods)."
In this artcle, classes are described as "a collection of encapsulated instance variables and methods (functions), possibly with implementation of those types together with a constructor function that can be used to create objects of the class."
They both point to each other.  This is confusing.  Steeltoe 16:07, 11 January 2007 (UTC)
replies: text: The problem with this type of article is that the exact concepts and terminology used vary from language to language and dexcription to description, and contributors, who are only familiar with an extremely small range of languages (there are thousands!), do not realize that others use the same terms differently.  I don't think these articles can afford to provide definitions of concepts from a single point of view, as they can't possibly be neutral that way. Rather they should make differences in the use of terms explicit. Rp (talk) 13:28, 12 February 2008 (UTC)
thread_title:  Circular Definitions 

message: I find some of the examples to be either misleading or not very helpful for illustrating the idea of mapping a real world entity to an object in a program, which is one of the real benefits of OO design. For instance the Java example that states "This example shows the simplest Java class possible." is completely false, it shows a simple example sure, but it's not helpful in understanding the point of using a class, and isn't the simplest class you can define in Java:
 class Simple {}
Not that this is very simple since an awful lot of behavior is being implied here if you know more about Java.
It would be nice if we could come up with some more appropriate examples for illustrating the OO paradigm and the concept of a class, not features of a language or specific syntax. MattOates (Ulti) 12:56, 18 February 2007 (UTC)
thread_title:  Examples 

message: As a newcomer to the world of C++ programing, I must say the terminology is very confusing and defining said terminology can be done more clearly. Once straightening out what each term means in everyday conversational English, I believe it would definitely clear up a lot of confusion. —The preceding unsigned comment was added by 157.62.105.5 (talk) 19:39, 28 February 2007 (UTC)
thread_title:  Confusing terminology 

message: "Are method definitions copied for each instance?"
No. There is only one definition for each method of a class for all instances of the classes. Only the data (fields) vary by instance.
Jim Anderson
Janderson507 14:24, 29 March 2007 (UTC)
thread_title:  Are method definitions copied for each instance? 

message: "why abstract classes are used?
Same reason you use interfaces. "
---
Actually this is not true. Interfaces provide an API that the consumer must implement, while abstract classes may have default implementations of methods that clients can take advantage of, rather than override.
Jim Anderson
Janderson507 14:28, 29 March 2007 (UTC)
thread_title:  Why abstract classes are used? 

message: "Depending on the language, classes may support multiple inheritance or may require the use of interfaces to extend other classes."
---
This statement doesn't make sense. Interfaces are not required to extend other classes regardless of whether a progamming language supports multiple inheritance.
Jim Anderson
Janderson507 14:33, 29 March 2007 (UTC)
replies: text: The point is that interfaces are used as a replacement of multiple inheritance in single-inheritance languages. Rp (talk) 13:30, 12 February 2008 (UTC)
thread_title:  Mutiple Inheritance and Interfaces 

message: "Scope refers to the visibility of a data component based upon where it is nested, that is between which set of braces ({}) it occurs."
---
Is this statement referring specifically to Java? If so, I think it should state as such. If not, not all programming languages use braces ({}) to delineate scope.
Jim Anderson
Janderson507 14:37, 29 March 2007 (UTC)
thread_title:  Scope 

message: "This is called encapsulation, and is one of the three fundamentals of object-oriented programming."
---
There are actually four "fundamentals of object-oriented programming."
1. Abstraction
2. Encapsulation
3. Inheritance
4. Polymorphism
Jim Anderson
Janderson507 14:41, 29 March 2007 (UTC)
thread_title:  Fundamentals of OOP 

message: This article is far from the standard I expect in a Wikipedia article.  I am new to programming and I wanted a clear and lucid encyclopedia definition of the concept of a class in OOP; instead I get something that reads like it comes from the manuals that fail to explain it clearly in the first place, while the discussion page contains very little serious effort towards improving the article, being taken up instead by a fight about Microsoft.  Beginning programmers like me are very aware of the huge gap between doofus-level programming books, which are easily mastered and usually overwritten, and the more useful stuff which is pitched far above our heads.  Wikipedia is in a position to fill that gap by explaining subjects as clearly as possible without a lot of whimsical cruft, but this article doesn't do it.  I would make suggestions to improve it, but I only know about writing comprehensible English, very little about the subject in question.  The only helpful suggestion I've seen is the tentative analogy between classes in OOP and classes in set theory; I don't even know if it's a good analogy, but if so it at least helps to make things clearer.  (The article on Pointers strikes me by comparison as a model of how to write this sort of piece.)  Can we stop the 'edit war' (which isn't one, because very little editing seems to be getting done) and get on with explaining the topic, please?  Lexo 14:19, 5 May 2007 (UTC)
thread_title:  This article and its discontents 

message: referring to the inconsistent use of the semicolon (;) in the Introduction section.  —Preceding unsigned comment added by 62.101.126.216 (talk) 01:48, 25 September 2007 (UTC)
thread_title:  Mistake in pseudo code ?