The important paradigm of lesson two (1)
Guide before class
This lesson discusses five of the most important programming paradigms: imperative, functional, logical, object, and concurrency. These are just introductory introductions, the reader understands their spirit, and the details need not be overly concerned.
This lesson is divided into four sections--
1. Command paradigm
2. Declaration Paradigm
3. Object Paradigm
4. Concurrency paradigm
2.1 Command Paradigm--all actions listen to the conductor
The greatest goal in life is action-Rockefeller's advice
Keywords: programming paradigm, imperative, structured programming, flowchart
Absrtact: Simple Talk about imperative programming
? Questions
What is imperative programming? Why is it the most common programming paradigm?
What is structured programming? What is the main idea of structured programming?
: Explain
At the beginning of the second lesson, the colon was straight up: "First, introduce the most primitive and familiar programming paradigm: Imperative programming (Imperative programming)." The command-written program consists of a sequence of commands: ' Do this first, then do that ', and emphasize ' how '. More academically, imperative programming is the computer--exactly, the Feng Neumann (von Neumann machine)--the abstraction of the operating mechanism that takes instructions and data from memory and then executes it. From the paradigm point of view, the world view is that the procedure is an ordered list composed of a number of action commands, and its methodology is to use variables to store data and use statements to execute instructions. ”
The comma muttered: "Are we using a programming language that is not all command-style?" ”
"It should be said that the vast majority of languages are imperative, but not imperative language is there." As for the latter, we will discuss it later. "The colon corrects the way," this is understandable. The evolution of language is gradual, most languages traced to the upgrading of assembly language, and machine language one by one corresponding to the assembly language is naturally imperative, so this paradigm is most traditional and universal. ”
Behold, the question mark was pursued: "Why machine language must be an imperative?" ”
"I appreciate you this kind of break the sand pot to ask the end of the spirit, but you can ask in the end, I do not promise to answer the end oh." The colon is somewhat amusing to say.
The question mark smiled slightly shyly.
"Theoretically, it is possible to have a command-only machine language, provided that the computer uses a special hardware implementation, such as a Neumann-structured data Flow machine (dataflow machine) and a reduction machine (reduction machine)." But this kind of computer is not popular in the city, the corresponding machine language is naturally rare [1]. "The colon still gives a reason."