Мальчик-Одуванчик wrote:А бывает, что и терминологию придумали позже чем тот или иной прием стал общеупотребительным настолько, что был отнесен к базовым понятиям.
Мне помнится пришлось обновить свои знания по ООП
Оказывается туда столько сейчас вдули, что все хрен упомнишь а казалось бы простенький вопрос
http://en.wikipedia.org/wiki/Object-ori ... d_concepts
Not all of these concepts appear in all object-oriented programming languages. For example, object-oriented programming that uses classes is sometimes called class-based programming, while prototype-based programming does not typically use classes. As a result, a significantly different yet analogous terminology is used to define the concepts of object and instance.
Benjamin C. Pierce and some other researchers view any attempt to distill OOP to a minimal set of features as futile. He nonetheless identifies fundamental features that support the OOP programming style in most object-oriented languages:[21]
Dynamic dispatch – when a method is invoked on an object, the object itself determines what code gets executed by looking up the method at run time in a table associated with the object. This feature distinguishes an object from an abstract data type (or module), which has a fixed (static) implementation of the operations for all instances. It is a programming methodology that gives modular component development while at the same time being very efficient.
Encapsulation (or multi-methods, in which case the state is kept separate)
Subtype polymorphism
Object inheritance (or delegation)
Open recursion – a special variable (syntactically it may be a keyword), usually called this or self, that allows a method body to invoke another method body of the same object. This variable is late-bound; it allows a method defined in one class to invoke another method that is defined later, in some subclass thereof.
Similarly, in his 2003 book, Concepts in programming languages, John C. Mitchell identifies four main features: dynamic dispatch, abstraction, subtype polymorphism, and inheritance.[22] Michael Lee Scott in Programming Language Pragmatics considers only encapsulation, inheritance and dynamic dispatch.[23]
Additional concepts used in object-oriented programming include:
Classes of objects
Instances of classes
Methods which act on the attached objects.
Message passing
Abstraction
"A patriot must always be ready to defend his country against his government." Edward Abbey