"OOP programming thought small sentiment"

Source: Internet
Author: User

Write something ... Beginning to omit 1000 words, haha, began to discuss OOP programming ideas ~

Let me translate oop (object-oriented programming)

I've been reading a C + + book lately, and I've seen this in the book (I'll summarize it as I say): OOP is a programming idea that has nothing to do with a specific programming language. (Is this true?) )

We continue to say that I have been working for almost three years, but have been working on operations (in fact, I do not like, too much trouble), so the technical aspects of a slightly dull. (No gossip.)

During the university and I saw this sentence during (may have seen before, but have not understood what the meaning), I have always heard the idea that C language is a process-oriented programming language, C + + is an object-oriented high-level programming language, Blalalala ....

The above view, right? The answer is yes, yes, but one-sided, it is easy to mislead a lot of beginners programming children's shoes. They may understand that, oh, the process-oriented language is C, and object-oriented is C + + or Java or other higher-level languages. This understanding is one-sided (at least when I really understand the object-oriented thinking, I also think so, and now I do not dare to say that I really understand the OOP spirit). As I understand it, I think that OOP should be interpreted in such a way that both C and C + + and other languages can implement process-oriented and object-oriented programming. Of course, in this sense, it is possible to implement object-oriented programming in C language (for example, you use a struct as a data object, and the members of a data object can only be accessed through a user-defined interface, but not directly to the members of the object, so is it possible to implement the characteristics of OOP?). We understand ha), C + + and other languages to achieve process-oriented programming is more simple (a tease in the end of the chant).

So OOP is a kind of programming idea, not specific to a particular language, and the program ape likes to use this way. C + + is dubbed an object-oriented language because it implements more features of OOP to review the five features of OOP (abstraction, encapsulation or data hiding, polymorphism, inheritance, code reusability). The classes provided in C + + are perfectly aligned with the OOP spirit (for the moment it's called the Spirit bar, feeling so much greater, haha).

This is my understanding of the OOP spirit, the back is still learning, I want to strive to be called development, because I like the code of the feeling ~, I hope here to bring a little enlightenment to beginners, do not make my previous mistakes.

Remember, OOP is a programming idea, not a patent for a language, and can be used in any language if you like.

qq:452260570 (like development can exchange ha, I call Three Bears, although my QQ nickname is called Su Xiao)

"OOP programming thought small sentiment"

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.