In many publications, these terms are used interchangeably and treated as synonyms, making the description hard to understand the concept of object-oriented programming in the context of programming in practice and design patterns. For example "...It (end OOP) is like a programming language model organized around objects rather than "actions" and data rather than logic. An "object" in an OOP language refers to a specific type, or "instance", of a class. Additionally, here we can find the term "a programming language model". My point is that a language is a set of alphabet, syntax, and semantics rules, but not a model. In this text snippet, the type is equivalent to instance for me.
Loading

Sam HobbsPosted Feb 11, 2024, 3:44 PM
The difference between a class and an object is simple. Objects are instances of classes. There is one and only one definition of a class but there are zero or more instances of classes and an instance of a class is called an object. An object occupies memory. An object is typically created using the new operator.
Terms like functional are meaningless to me. OOP has methods that are the same thing as actions and logic. It is totally possible to write a program using a language such as OOP that supports OOP yet use no classes (except C# requires a minimum of one class) and it is possible to use OOP concepts in a language such as C that does not support OOP. Originally OOP was implemented in C using C macros then C++ was designed after that.
I sure do not understand what the person is trying to say when they say refers to a specific type, or "instance", of a class. I think that part is wrong.
You say a language is a set of alphabet, syntax, and semantics rules. I would say that a a language is a set of characters, syntax, semantics rules and more but I do not know how to describe the more part.
Mariusz PostolPosted Feb 12, 2024, 12:47 PM
Sam Hobbs, I agree I am not a native speaker. Actually, in my background school I learned that alphabet (pl. alfabet) is a set of letters.
From Google we can learn:
and also
From the Longman Dictionary of Contemporary English:
Unfortunately, all the definitions refer to the spoken language but we discuss programming language instead following this portal's aims. I agree with you but still, I am looking for a universal means allowing us to define all valid characters (graphical symbols) that can be accepted by (a) the file system, and (b) the compiler. The file system, because at the very beginning, a program is a set of files and can be written using any notepad. Therefore I have created an independent thread to discuss this topic and I propose to move the discussion to it if you don't mind.
Sam HobbsPosted Feb 12, 2024, 2:32 AM
The alphabet is not all characters or any set of characters other than letters. The alphabet is only letters. Please inform as many people as you can about that.
Mariusz PostolPosted Feb 11, 2024, 4:18 PM
Sam Hobbs, I agree 100% and would only add:
1. class is one of the types
2. A set of characters is the alphabet.
My point is that it is easier to explain the mentioned terms distinguishing between run-time and design-time. Instance (called also an object) are run-time terms. They exist (are created or instantiated) after executing the program, To instantiate an object we can use the "new" operator or reflection alternatively. The program is a text created at design time and uses the term type as a syntax construct. And class is one of the possible types we have in all modern languages. It is a reference type in contrast to value types.
Defining the semantics rules as rules that can be used to associate a meaning to the correct (against syntax rules) text we don't need "more", isn't it?
Thank you for the answer.