"Introduction to Programming (Java) 1.4.1 Paradigm"

Source: Internet
Author: User

This landlord, is my student? Written in 2013!

Well, "the programming paradigm is probably the most important term to understand when learning any programming language." This sentence was published in 2005, "Java Programming" (Song Zhong, Yan Thousand June, Tsinghua University Press) wrote. But

After Thomas Kuhn put forward the paradigm of "scientific Revolution", Robert Floyd used the term "programming paradigm" in the 1979 Turing Award presentation. The programming paradigm typically consists of three aspects, with OOP as an example: ... "as if it had been written in the PPT of the lecture before the introduction of programming (Java) was published. In addition to the text reference on the programming paradigm, the other text of the landlord is not what I want to say. If it's my student, I'm going to hit his butt.


Because:

1. I do not want to use event-driven programming, plumbing, etc. Robert Freud's "W.floyd" in the various paradigms of programming is called the programming paradigm. In my opinion, the programming paradigm must originate from the root of computer science: general recursive functions, lambda expressions, Turing, plus object-oriented, 4 large paradigms. Other, is some small style, such as callback, generics and so on.

2. I don't like the term multi-paradigm. According to the paradigm theory of Thomas Kuhn, the old and new paradigm is irreducible and not comparable. So, for the java/c# of these imperative object-oriented languages, multiple paradigms are at different levels, for example, we can say at the method level that it employs the command paradigm.

3. In a way, object oriented in addition to new perspectives and ways of thinking, as well as LSP, it has almost nothing. After all, various object-oriented programming languages absorb the command paradigm and the functional paradigm of a large number of techniques, relying on lsp to form their own logical system.

4. When discussing the object-oriented paradigm, I don't emphasize encapsulation, inheritance, and polymorphism too much. These things can be regarded as PLP grammatical phenomenon. If the Parnas principle/ interface and implementation of the separation (separation of interfaceand implementation ) on the basis of the extension to the interface of the class, you need to encapsulate this means-- The interface is qualified with an access modifier. In addition, the encapsulation of the method/function, in C is the basic concept-the authentic interface and implementation separation, because the lsp--sub-class to replace the parent class, naturally have (pure) polymorphism (phenomenon), inheritance is the nature of the class hierarchy, and I repeatedly emphasize that inheritance Relationship introduces the reusability of some code, but reusability is not the reason for the design class hierarchy, about OOP reusability , The principle that can be relied on is code up-set . When the parent design, more abstract methods are used to declare their own interfaces.

5. Class is the encapsulation of data and behavior, right? I say people have faith, you say people have muscle, is composed of atoms. Can I say you're not right? So, I want you to see this video of power of ten. As early as in 0.2.2, it explains: "The most basic point of view of object-oriented technology: programming is not to write instruction set, but to create a self-managed, interactive object of the world ." "In the absolute ultimate sense, programming is to write a set of instructions that the computer will keep pace with." As people eventually are made up of atoms, you can oppose the saying of ghosts, but you cannot use atoms as the basic unit of research in social science or economics, and the economic man hypothesis itself is absurd (well, Have a lot of limitations).



Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

"Introduction to Programming (Java) 1.4.1 Paradigm"

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.