Characteristics and comparison of various advanced languages

Source: Internet
Author: User

Http://www.cnblogs.com/waynelin/p/5505399.html

Pascal Language:

Pascal is a computer-generic high-level programming language, designed and founded by Professor Niklaus Wirth of Switzerland in the late 60.
The main features of Pascal are: strict structure form, rich and complete data type, high running efficiency, strong ability to check and error.
Due to these characteristics, Pascal can be conveniently used to describe various algorithms and data structures. For beginners of program design, Pascal language is beneficial to develop good programming style and habit. IOI (International Olympic Informatics Competition) Pascal language as one of the three programming languages. NOI (National Olympic Informatics Competition) The Pascal language is the only programming language advocated by the university, and the Pascal language is often used as a mathematical language for learning data structures and algorithms.


C Language:

C language is between the assembly language and the high-level language, belongs to the high-level language, also known as intermediate Language, is a compilation and high-level language advantages in one of the programming language. was introduced in Bell Labs in the United States in 1972. The early C language was mainly used in UNIX systems. Because of the strong function of C language and the advantages of various aspects gradually for people to understand, in the 90 's, the C language began to enter other operating systems, and soon in all kinds of large, medium, small and microcomputer has been widely used. Become one of the most outstanding programming languages of the modern times.

Features of C

1. is a structured language. Clear hierarchy, easy to organize the program in a modular way, easy to debug and maintenance.

2. C language performance and processing ability is very strong. Not only has rich operators and data types, easy to implement a variety of complex data structures, it can also directly access the physical address of the memory, do bit-level operation.

3. Because the C language realizes the programming operation to the hardware, it can be used for the development of the system software as well as for the application software development. C language also has the characteristics of high efficiency and strong portability. Therefore, it has been widely transplanted to various kinds of computers, thus forming various versions of C language.

4. Because the C language allows direct manipulation of bits, bytes, and addresses, it is possible to implement most of the functions of assembly language.

5. The target code is high quality and the program execution efficiency is high.

Generally speaking, the C language has the advantages of being concise, compact, easy to use, flexible, easy to learn and apply. There are only 32 keywords. There are 9 kinds of control statements, and the written form of the program is also free.

C language Weaknesses: Non-strong type, grammar restrictions are not strict, so that programmers can not rely too much on the C compiler to check the wrong, lack of real-time checks, such as array out of bounds.

Strictly speaking, C is a block-structured language because it is structurally similar to Algol, Pascal, and Modula-2. Technically, block-structured languages allow procedures and functions to be defined in procedures and functions. Because the C language does not allow functions to be defined in a function, it cannot be called a block-structured language in the usual sense.

C language as a process-oriented computer language, has been more than more than 30 years of history, widely used, whether it is Windows or Linux, you see the bottom is written in C. Most of the network protocols are also implemented in C. You see the most beautiful game screen is also implemented with C, industrial control procedures are also implemented with C. But C is not omnipotent, but in some ways it applies.

C + + language

C + + was developed in 1986 by the T-Bell Laboratory, which aims to reduce procedural complexity and improve program reliability by reducing the side-effects of program variables through data encapsulation. (the author has heard that the purpose of developing C + + is to understand the C language more and more people, so need to make a more difficult, more powerful than the C language, to keep the job, so.) C + + was born) C + + is the direct extension of language, C + + 's multi-inheritance mechanism can better describe the object's properties and behavior.

C + + is an extension of C. but C + + can be seen as a whole new language.

C + + Features: Object-oriented, inheritance, encapsulation, polymorphism.

C + + is an extension of C, so it also has the characteristics of C.

C + + On the basis of the addition of the idea of object-oriented programming, also decided that the efficiency of C + + in a certain aspect is not as C. For example, to define a type, C + + classes (class) to encapsulate, and C may be directly a few variables of the combination of a struct (struct), the class has not only member variables, but also has member functions, and in a fine comparison of its efficiency, C than C + + efficiency is higher. However, because of the development of the Times, the project or the project is huge, based on the object-oriented thinking is obviously more adaptable. C + + In this respect can do more beautiful than C. Now many system-level programming is implemented in C + +, and many application-level software is implemented in C + +.

One thing to note here is that C + + is not a complete object-oriented language. It provides an object-oriented model and ideas, but it is also compatible with process-oriented models.

Java language

The Java language comes from a project called Green from Sun, whose original purpose was to develop a distributed code system for consumer electronics products, so that we could send email to household appliances such as refrigerators and televisions. Control and exchange of information with them. Start, ready to use C + +, but C + + is too complex, with poor security, and finally with a new language oak (the predecessor of Java), Oak is a sophisticated and secure language for the web, which Sun has been bidding on for an interactive TV project, but was defeated by SGI. Poor oak was almost homeless, and by this time mark Ardreesen developed mosaic and Netscape inspired the Oak project team, who compiled the HotJava browser with the support of Sun's chief executive Scott McNealy, Triggered a Java foray into the Internet. Java's name is an anecdote: one day, members of several members of the Java group are discussing what name to give to the new language, when they are drinking Java coffee in a café, a person brainwave said to be Java, get other people's praise, so, This is how the name of Java is spread.

Features of Java:

1. Simplicity: Style is similar to C++,java's rejection of a place in C + + prone to program errors, such as pointers and memory management.

2. Object-oriented: Java is a fully object-oriented language. From this point of view, Java is similar to Smalltalk, but its features, especially those applicable to distributed computing environments, go far beyond Smalltalk.

3. Distributed: Java includes a sub-library that supports TCP/IP protocol based on HTTP and FTP. As a result, Java applications can open and Access objects on the network with URLs that are almost identical to accessing the local file system.

4. Robust: Java is committed to checking the program's errors at compile and run time. Type checking helps to check out many errors that occurred early in development. Java's own manipulation of memory reduces the likelihood of memory errors.

5. Structure-neutral: Java compiles the program into a structure-neutral intermediate file format. This intermediate code is executed as long as the machine with the Java operating system executes. This intermediate language is designed to run on a virtual machine and is implemented by a machine-related run debugger.

6. Safety:
1) Remove the incense pointer and manually release memory and other functions, avoid illegal memory operation.
2) When Java is used to create a browser, the language features are combined with the functionality provided by the browser itself.
Before Java is executed on a machine, it undergoes a lot of testing, code validation, checking the format of the code snippet, detecting pointer manipulation, whether the object is operating excessively, and attempting to change the type of an object.

7. Portable: Architecture-independent features enable Java applications to run on any computer system equipped with a Java interpreter and a running environment. Any Java code is interpreted as an intermediate language, and then the program is run through a specific environment (such as machine instructions) on different machines. To facilitate the portability of the characteristics.

8. Explanatory. The Java interpreter can run the target Code directive directly. The linker usually has fewer resources than the compiler requires.

9. Performance. If the interpreter is slow, Java can translate the target code directly into machine instructions at run time. Sun uses a direct interpreter to invoke 300,000 processes in a second.

10. Multithreading: The multithreaded functionality provided by Java enables multiple small tasks to be performed simultaneously in a single program. The greater benefit of multithreading is better interaction performance and real-time control performance.

11. Dynamic: Dynamic properties allow the program to dynamically load classes that are required during the run. The benefit of determining a reference at run time is that you can use a class that has been updated without worrying about affecting the original code. If a program connects to a class in another system on the network, the owner of the class can also be free to update the class without crashing any programs that reference the class.

Shortly after the birth of Java, it was welcomed by the masses, and even some people say that with Java, can not C + +. Java was once referred to a very high position. This is certainly a kind of appreciation of Java, just a little too. To this day, Java is still not a substitute for c,c++, and new rivals have emerged. Net (will be described later).

Java is currently the main application: Web browser, network application system.


C # language.

C # is an accurate, simple, type-safe, object-oriented language. Speaking of C #, you have to briefly introduce. Net. What is. NET, according to Microsoft CEO and CEO Steve Ballrner defines it as:. NET represents a collection, an environment that can be used as a platform to support the next generation of the Internet's programmable architecture. C # is the representative language of. Net.

Features of C #:

1. Fully object-oriented.

2. Support for distributed, C #, because Microsoft believes that distributed applications are the future trend, that is, the processing process is distributed on the client and the server. So the birth of C # is destined to solve the distributed problem well.

3. Like Java, C # code is compiled to become an IL (intermediate language). At run time, the IL is then compiled into platform-specific code.

4. Robust, C # is no worse than java,c# in checking for program errors and compile-and-run errors. The automatic management of memory mechanism is also used.

5. C # does not completely abandon pointers and manual memory management as Java does. C # does not use pointers by default, and programmers can open pointers when they are necessary to use them. This guarantees the flexibility of the programming.

6. Security: C # Security is provided by the. NET Platform. C # code compiles and becomes the Il language. is a controlled code that provides a type of security check and other mechanisms to ensure that the code is secure.

7. Portability: Because C # uses a Java-like intermediate language mechanism. Makes C # similar to Java and can be easily ported to other systems. At run time, the intermediate code is compiled into code appropriate for a particular machine.

8. Explanatory: C # is also a special explanatory language.

9. High performance: C # After compiling the code into an intermediate language, the program can be executed efficiently.

10. Multithreading: Like Java, you can have multiple threads that perform small tasks from one main process.

11. Component mode: C # is well suited for component development. Individual components can be implemented in other languages and then integrated in. Net.

C # is a new language that was born after Java was popular. Microsoft has a great advantage on the operating system. In the past development has accumulated a lot of experience, the formation of the. NET platform, so C # in Windows can be said than Java has a greater advantage. If purely technically, C # can rival Java in Network programming. C # also has a certain advantage in Windows Forms.

C # is a very similar language to C + +, the style is closer to Java, whether it is a C + + programmer or Java programmer, can easily go to C #.

The power of C # relies on the development of. NET, and the development of. NET is about how much Microsoft is committed to and invested in. Net. From Windows 2003 and Vista the system can be seen (the former built-in. net1.1, the latter built-in. net2.0. . NET is of great strategic importance in Windows programming.

C # is now mainly used in network programming, other areas such as database, form programming, are gradually increasing.

Pascal PK C

Now, let's look at the process of learning Pascal and C: Learn Hello World and then know how to compile and run. Then learn the basic data type and then enter the output. No matter how well the school wants the students to learn, it is no different from the fact that students learn Pascal and learn C. The difference is only the language style. One might say that the essence of learning C is the pointer. C will be much stronger than Pascal. Yes, pointers are a key to learning C. But as I study C's textbook, the pointers used are simply. Understanding the difference between *p and P is enough. Then you'll make a few simple lines of code and think of it as C. There are many functions in the C library, and the teacher seldom speaks in class. such as Memset,qsort, and so on, less of these. You learn Pascal and C are no different, just as the foundation of learning other languages. Because there is no language foundation, there are a lot of good students because the teacher did not speak in class, they thought the teacher taught. This is the weakness of good students. If it is a "bad" student, do not listen to the classroom. It is also possible to discover how superficial c is in the classroom. Also, I have never seen a school that teaches C graphics development. Although graphic development is not a language foundation. However, it is a good choice to expand the programming horizons of new students. Modern program software Support graphics window is too rich, almost not too many students to care about the form of settings, positioning and other functions. Graphic programming can also arouse students ' desire for programming. I have implemented the animation of C, when all the graphics are as expected to move up, that kind of excitement like you in the case of ice and snow suddenly pour you a plate of water feel that feeling.

C PK C + +

C + + is on the basis of the development. It looks like these two PK, the winner is definitely C + +. Not really. c So far there is room for survival, and not to be replaced by C + + overall. Shows that C or has an irreplaceable role. C is currently used primarily in hardware-level parts, and in applications with high performance requirements. But for complex system-level development, it is obvious that C + + appears comfortable. With practice, many people learn C + + when, there is already a C foundation. There is the foundation of C, the basic types of C + + can be quickly through, and then learn classes, inheritance, polymorphism and other concepts. Or from my experience, I chose C + +, and then almost no class, because really listen to sleep, before the end of the term with C + + do a big job, it is called C + + ha, then the exam is of course relaxed. In fact, I still did not learn C + +, in essence, I just still will point C on the basis. One more structure type: class, just. After the use of 1 years of C + +, only to suddenly realize the ignorance of the year. To understand what C + + is. I believe that the students who have studied C + + estimate that there are many people who have not yet figured out the concept of Io stream. The cause of this phenomenon is: 1. Students themselves are not seriously programmed to implement. 2. The teacher is just repeating the lecture. The final decision on whether the students will be C + + standards is only test-oriented. As for the effectiveness of the examination system in the computer system, the author will give a personal opinion article in the next few days.

Java PK C #

Many people are talking about these two languages at present. When I began to learn C #, I had seen the Java Programmer's view of C #. Make C # a worthless. Suddenly it seems that many Java programmers have a natural hostility to C #. I think I am proficient in C # (don't bs me). I've learned Java in the past and I'm writing about what I've been feeling. Although Microsoft has always said that C # is inherited from C + +, the code structure, and the built-in support classes, are surprisingly similar to Java. I feel that C # is on top of Java, designed for the pros and cons of Java. I used C, C + +, Java, feel or C # Best, this is only the author's personal feelings. Because C # still retains pointers, when it comes to implementing the lower-level, performance-demanding, one solution is that C # can open pointers, and Java is not, Java can only be solved by other means, such as optimization algorithms.

Java has been a big success for non-Windows: A survey company used Google's search engine to count the number of engineers skilled in a language, the usability of a language course, and how many companies were selling software written in a language. The final comprehensive score is: Java ranked first in 45.2 points, the second is C, the score is 32.2;c++ is ranked third in 24.6 points; C # lags far behind in Nineth place, scoring 4.6. These data are data from a few years ago. In this test, it was also found that the popularity of C # is rising sharply, while Java is relatively stable. One reason for this is that. NET allows many programming languages, unlike Java, which restricts people to only one language. Developers can write code in almost any language, including C, C + +, C #, or even Java, and then translate the code into CLR code that the machine understands (common language runtime code). So. NET allows developers to protect their "code investments", in other words, code written in C and C + + can be reused in the past. And Java can only re-write code.

Characteristics and comparison of various advanced languages

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.