The difference between the Shell scripting language and the compiled language

Source: Internet
Author: User

In general, the programming language can be divided into two categories: the compiled language and the interpreted language.

Compiled languages

Many of the traditional programming languages, such as Fortran, Ada, Pascal, C, C + +, and Java, are compiled languages. These languages require that the source code that we have written be converted into a target tag (object codes), and this process is called "compiling".

When you run the program, read the object code directly. Because the compiled object code is very close to the bottom of the computer, the execution is very efficient, which is the advantage of a compiled language.

However, since most of the compiled languages work on the ground floor, dealing with bytes, integers, floating-point numbers, or other machine-level objects, it is often necessary to implement a simple function that requires a lot of complex code. For example, in C + +, it's hard to do simple things like "copy all files from one directory to another."

Interpreted language

Interpreted language is also known as the "scripting language". When executing such a program, The interpreter (interpreter) needs to read the source code that we wrote and convert it to the target (object), which is then run by the computer. Because each execution of the program is more than the compilation process, so efficiency has decreased.

The advantage of using scripting languages is that they are mostly run at a higher level than the compiled language and can easily handle objects such as files and directories, and the disadvantage is that they are often less efficient than compiled languages. However, the tradeoff is that scripting is usually worthwhile: a simple script that takes one hours to write, the same functionality written in C or C + +, can take up to two days, and, in general, the speed of the script execution is fast enough to let people ignore its performance problems. Examples of scripting languages are awk, Perl, Python, Ruby, and Shell.

The difference between the Shell scripting language and the compiled language

Related Article

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.