Also, "Understanding of programming languages"

Source: Internet
Author: User

-- The statement is that I wrote this article by hand. It was just like reading the knowmore article, but it didn't mean to be on the platform. Thank you for your patience and criticism.

I. Language Classification

The classification of languages is different from each other. My personal opinion is divided into two categories: process-oriented language and object-oriented language. The process-oriented language focuses on the description of logical processes. The object-oriented language adds the object description and operation-related syntax to the process.

Typical process-oriented languages include C, Pascal, and assembly. The process description is generally a branch and a loop (sequential execution is required, not to mention .). Branches are divided into two branches and multiple branches. Typical two-way Branch: if ...... Else ...... Of course, there is also a single if case. A multi-path Branch usually refers to a switch ...... Case, or if ...... Else if ...... Else. There are two types of loops: while loop and do ...... While ...... Loop. Generally, while loops can be equivalent to for loops, so they are of the same type. Do ...... While ...... The main feature of a loop is to execute and then judge, while a while loop is to judge and then execute.

typical object-oriented languages include C ++, C #, and Java. Generally, object-oriented syntax features are added to the process-oriented language, such: c ++ and object-oriented Pascal, of course, such as C # and Java are not listed here. The object-oriented language certainly contains many process-oriented description branches and loops. It also contains object-oriented features. Encapsulation, inheritance, and polymorphism are common features of all oo languages. The so-called encapsulation restricts the access permissions of the members of the object outside the army. It usually supports public, private, and protected. Inheritance means that the derived class can use the Code heritage of the parent class to reuse some code and functions (a relatively simple explanation, it is not easy to say clearly in one sentence, so please forgive me ). Polymorphism means that sub-classes implement different behaviors on the basis of integrating the "interface" defined by the parent class (it is difficult to make it clear in one sentence, so please forgive me ). We are familiar with these features, but we may ignore them. That is, languages that support oo generally support exception capturing and processing. This is also necessary for a mature OO language. However, process-oriented languages are basically not supported.

2. The language is" pale and powerless "

the language functions of all computers are limited to the description of execution logic. However, the language itself is not capable of execution. Why? Generally, when you are new to a programming technology, you will first come to the helloworld example. This example is the best Program in the world, the largest number of operators, the widest distribution, the most stable operation, and the most popular versions (because of the many languages. Take C ++, C #, and Java for example:
C ++ version:
main ()
{< br> cout <"Hello World" }< br> C # version:
Public static void main ()
{< br> system. console. writeline ("Hello World");
}< br> JAVA version:
Public static void main (string ARGs [])
{< br> system. out. println ("Hello World")
}< br> Please note that none of the three versions of the hello World program can output the "Hello World" string, instead, it is a library function. Cout, console, and out are not reserved words in their respective languages. If you retrieve them as a library function class in the document, you can find them. For example, it is not enough to write a program to grasp the language alone. More challenging learning is to master a set of function libraries that can be called in a language. To write programs in C language, you must be able to use CRT flexibly. To write programs in C ++, you need to know one or more types of libraries such as CRT, STL, ATL, and boost (C ++ has the most messy libraries, and STL has more than N versions ). If you use VB. NET, C #, and Java, congratulations, because the library you select and learn has only one function. Without the support of library functions, I can't do anything, so I speak a language that is "pale and powerless.

3. distinguish between languages and tools
In many cases, you may hear this conversation:
Q: "What language do you use for development? "A:" using Visual C ++"
Visual c ++ is a visual development tool developed by Microsoft, while C ++ is a programming language. When people ask a language, your answer tool is strictly speaking, that is, your lips are not right. But now people accept and get used to this statement. The above obfuscation occurs in almost all the popular development tools and programming languages on the market. List several items:
1) Delphi is a rad development tool produced by Borland. The program language used by this tool is object-oriented Pascal;
2) C ++ builder and Visual C ++ are visual development tools developed by Borland and Microsoft Based on C ++. Of course, the program languages used by these two tools are c ++;
3) Visual Studio is also a development tool developed by Microsoft, while C # and VB. NET are program languages;
......
4. What are development tools?
Essentially, a development tool consists of three parts: development interface, compiler, and function library. The compiler and function library, coupled with some of the documents necessary for development, constitute another stuff called SDK (many people have not objectively explained the SDK, just expand the abbreviation to three words ). Of course, you can also say that the development tool consists of the development interface and SDK.
Here are several typical examples:
Visual Studio series:
You are familiar with the development interface, including Solution Explorer, class explorer, toolbox, and code editing interface. The compiler package contains the csung compiler (csc.exe?、c=+ (cl.exe) and so on. Function libraries include. NET Framework class library, CRT, MFC, and ATL. In fact, the Visual Studio series includes. Net SDK and window Platform SDK (mainly C ++ compiler and Windows API ).
Eclipse series:
The development interface also includes browser-like, CVS browser, and code editing interface. The compiler contains the Java compiler. The function library is mainly the jdk api. Eclipse includes JDK, which is the Java SDK.
Under normal circumstances, various sdks are usually free of charge. That is to say, you can obtain the language compiler and related library functions and development documents from the official website of the vendor for free. Development tools actually sell money on the development interface. If you can make sure that you can browse thousands of lines of code in your notebook without interrupting the compiler and know all the compilation parameters, you can write your own program in a free and bright way (after all, notepad comes with the OS and you have paid for it ).

V.Is it difficult to learn a language?

If it's just the language itself, it's easy. The above summary shows the basic content of the language. Your conversion from one language to another may only need to adapt to Case sensitivity, use braces to indicate the boundary, or use begin ...... End indicates miscellaneous. It is estimated that there will be one or two weeks. If you want to use this language to write programs as you like, it is a difficult and long process, because you must be familiar with at least a huge set of function libraries.

Sat.What are the relationships between languages, development methods, and design patterns?
 
In my personal opinion, the program language is the basis for describing the execution logic. The development method belongs to the scope of methodology. Are waterfall models or spiral models used? These are all metaphysical things that provide theoretical guidance for development practices. The design mode is the refinement and Inheritance of development experience. In terms of syntax description, the design pattern thoroughly describes and explains the relationship between code and code. These three transactions are an indispensable component of program development, like three vertices in a triangle. After a while, you will find that the most important thing to do with software is management and methodology. After all, computers are very honest. People are the biggest uncertainties in software development. The theoretical guidance of methodology runs through every milestone in software development.

The above is a family statement. Welcome to ban'er brick. ^

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.