Colon class § 2.3: Object paradigm

Source: Internet
Author: User
Tags definition inheritance

The important paradigm of lesson two (3)

2.3 Object Paradigm--programming rules of democratic Society

The people for your, the second, June for light--"Mencius Heart"

Keywords: programming paradigm, OOP, object-oriented, program programming

Summary: Oop simple Talk

? Questions

Is OOP a special type of command?

What is the basic idea of OOP?

Where is oop really good?

Will OOP be eminence?

What is the difference between programming and OOP in the design concept?

: Explain

After the short resting, the quotation mark eagerly asks: "The object-oriented paradigm should be a special kind of command, right?" ”

"Object oriented?" "The colon muttered," Let's call oo or object-style, neither unconventional nor erroneous. Before answering your question, please answer me first: What is OOP? ”

Quote Ching: "OOP (object-oriented programming) is a computer programming model that uses objects as the basic element of the problem space, using the interaction between objects and objects to design programs." The object is an abstraction of the entity in the real problem, which has certain properties and functions. The three basic features of OOP are encapsulation, inheritance, and polymorphism. The so-called encapsulation is--"

The colon makes a pause gesture: "The basic characteristics of OOP believe that we have long been familiar with, so according to your definition, whether OOP must be an imperative conclusion?" ”

Quote Crooked Head thought for a while, replied: "From the definition seems not to come, is not C + +, Java, C # is not imperative?" ”

The colon answers, "of course, but this does not prevent Clos from becoming an OO version of Lisp, and the Prolog has a number of extensions that incorporate OO features such as visual Prolog, Logtalk, and so on." Although OOP is developed on the basis of command, its core ideas can be generalized as data-centric organization logic, which regards system as the object set of interaction, and enhances reusability by using inheritance and polymorphism. This idea can also be applied to functions and logic, except that the method of an object is changed from a procedure in a command to a function in a function and an assertion in a logical form. Generally speaking, imperative, functional, and logical are parallel to each other, and OOP is orthogonal to them. ”

Question mark question: "OOP has become a trend, and only C is not oo in the 12 popular languages listed in the class, does this mean that OOP is going to eminence?" ”

"Strictly speaking, VB (except vb.net) and JavaScript are not oo, just object-based (object Based) [1]." "The colon corrects," as to whether OOP will eminence, the answer is no. First, unlike the three most basic paradigms that can be independently, pure oop is non-existent [2] and must be combined with other paradigms; Secondly, there is no panacea for all ills, and OOP is no exception. In the jargon of the software industry: there is no silver bullet (no silver bullet) [3]. OOP is most suitable for large complex and interactive systems, especially those closely related to the real world, but it has no advantage in small applications, mathematical calculations and symbolic processing. It should be noted that the prevalence of language and paradigms is closely related to large corporate support and business promotion. Some people say that OOP is actually mop (money-oriented programming), that is, money-oriented. Despite the extreme suspicion, but experienced shareholders know that the main operation of the stock is always rising faster. Of course oop can be popular, its own unique, who can say where it is good? ”

Comma answer: "OOP can improve software reusability, scalability and flexibility." ”

The colon asks: "Why is procedural programming so reusable, scalable, and flexible?" ”

Feel friendly, comma a bit hollow: "Because OOP has the characteristics of information hiding, inheritance and polymorphism." ”

The colon does not buy: "First, it is trees, trees--the common goal of all paradigms and languages to equate reusability, scalability, and flexibility with OOP." Secondly, in C language as an example, the information hiding can be implemented by the keyword static, and the inheritance can be synthesized (composition) instead; polymorphism is difficult and flexible. What's more, these are just means, not goals, as long as the design is reasonable, the C program is also reusable, scalable and flexible, performance efficiency is more superior. Even in the increasingly popular OOP today, C's share has always been at the forefront of many large and complex software such as operating systems, databases, etc. are still mainly C, which is enough to prove that it is still worthy of great use. ”

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.