The features of various programming languages

Source: Internet
Author: User

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 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 thatC + + is not a complete object-oriented language. It provides an object-oriented model and ideas, but is 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.



Finally finished writing the characteristics of various languages. Please leave a message if the readers disagree with the above views. No, BS, I'm right. All right. Go on, I need to talk about the subject!

Second, we now assume that a beginner does not have any programming language foundation. To compare the various languages first:

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.

All Mentors (schools, training institutions, and people who take you) expect new students to lay the groundwork for good programming in enough time. From the introduction of Pascal, it seems to be very suitable from the beginning. But I started from C, did not learn Pascal, the design of the habit and characteristics of a little less than the people who learn Pascal poor. I think this is not the similarities and differences in language caused by different personal level, is to take a language book, how the new students learn programming. Many freshmen may think that a good class, listen to the teacher, and then come back to their computer on the teacher told the content on the machine to try again, OK. It is estimated that even many teachers think so. I think that even if there are students to do, the effect is not good. For example, C language, I read a lot of C's tutorial book, the content is similar. In the previous chapters, the basic types of language definitions are also described in detail. And then talk about structures and stuff. C + + is the lecture class, inheritance and so on. These things, I feel that there is nothing good to say in class, to say the most also half a class. If there is a certain programming basis for people, these things learn faster. But the author's experience is that these classes are full of a semester, and some later chapters are too late to speak. The author is not fortunate, in the Java class, not on the machine class, the basic types are on the half semester, many students themselves even the SDK are not installed, the final exam on the test pass. Even this should be done in accordance with the traditional assessment method: scaled examination to solve. Students can pass the college entrance examination, whether it is the real material or false there is material, I believe that the test has been able to, for the computer department, I think that can not be all in accordance with the traditional teaching model to set, it is just closed eyes nonsense words. The program is highly unique. You can do it, not just not. Scaled a better answer is just blowing. I believe that not only my school, other major colleges and universities will not be much worse.

Here by the way: for the freshmen, you should be able to see the computer system and high school when the environment is different. Middle School can be a special test, do not have to learn something too practical (unless you read it, ready to work). But to the undergraduate, if you are only to deal with the teaching, and then just to win the scholarship, and finally you do not graduate school or study, it can be said that you in the last year to find a job when the first self-guilty. Although the outside society to undergraduate requirements is not too high, do not need to students of technology like the outside of the technical cattle so high. But this does not mean that students can not have any skills. Now I am afraid that only state-owned enterprises are very important to students ' grades, scholarships and so on. But it is not expected that all students can go to state-owned enterprises smoothly.

Choosing a programming language is also an important part of the process, which depends on where the new person's interest is. For example, some people like hackers, then it may be suitable for learning C, as well as various scripts. Some people only like the network programming, then perhaps he chooses Java or C # to be more suitable. If someone wants to be good at Windows programming, then VC + +. NET programming may be a good choice. The language is not much, but the essence. If only learn a little change language, it is better not to learn, to play games, to find someone to chat.

Data structure: This is the most basic lesson in programming. One of the reasons that you can learn to program well is that you have not learned the data structure. Attention, not learning data structure, may not be difficult to make a process. If the students only listen to the teacher's structure in each class. Then understand the end of the words, the data structure will not learn, do not think that the test of a 9X minutes happy. Maybe it's worse than a 60-point test. According to the author's experience. A lot of people in a class, estimated that a semester is over, even a list of how to implement the language do not understand. For the data structure, the new language to achieve, this does not matter. As long as you can use a language, it's OK.

It is important to learn to program one thing, to learn to look at others ' code. Understand the intentions of others from the code. In this way, you can quickly learn a variety of techniques to improve their programming ability.

Many freshmen may encounter a more common problem, that is, the things that have been made up before will be forgotten, and later to write the same function code, then forget. I used to run into it. I think you should know how to save or encapsulate the code you write. You can use it when you want to use it later, without rewriting it. If you think of a better algorithm later, then replace the old code. Here I recommend to learn to create a link interface, Windows is DLL or lik, other systems I have not tried, not clear, but there will always be the corresponding chain interface files. In this way, after the code has been tested, encapsulated in the DLL, it can be saved for a long time. It can be called when it needs to be used. This can focus most of the attention on new issues rather than on the algorithms that have been implemented.

The main point of learning programming, or more programming. And try to get in touch with different aspects of the problem and try to solve it. In this way, there will be a great improvement in technology. The education of an undergraduate school does not teach a programmer. Programmers only have to program, reprogram, and then program, so the process can be exercised.

In the end, I did not answer the question of the title positively. Unfortunately, I can not give you a definite answer, because each has an advantage. My point is that you choose a language that you think has developed according to your interests and then retreat to practice. No matter what the outside say, learn is the hard truth. Don't worry about you going to other languages in the future. For students, I would recommend C + + as the basis for getting started. Emphasis can be placed on C + + to learn the object-oriented thinking. Learn from programming how to use object-oriented, rather than simply endorsing. Computer Department of the class should not go back, do not understand the information on the line. When the student has a certain programming ability, you can choose your future as the main language. You can continue to study C + + or choose any language in Java or. Net. If you don't waste too much time, college time is enough to create a computer department with a good technical foundation.

The features of various programming 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.