The colon and his students (serial 16)--Dynamic language

Source: Internet
Author: User
Tags ruby on rails

16. Dynamic language

Freedom is not free--kelly strong

Exclamation-Mark impatient to ask: "Now can talk about dynamic language?" ”

Colon speech: "Once upon a time, dynamic language is only to accompany the Prince reading role, when their name is ' scripting language '." Recently, but the rapid rise, as if there is a rival to the static language. ”

The question mark cannot help asking: "Is the dynamic language and the scripting language the same thing?" ”

The concept of scripting language is more explicit than the ambiguity of dynamic language definition. "Colon avoidance gives the answer directly," The script's reference is to distinguish it from the general program. The inventor of Perl, Larry Wall, deserves to be a linguist, and there's a wonderful saying: ' A script is what you give the actors, and a program is what you give the audience '. The script is for the actor, the program is for the audience to see. This is the meaning of pun--program ' program ' and ' procedure '. ”

"The actor here refers to the programmer, and the audience refers to the user," he said. In other words, the program is for the end-user service, and the script is for the programmer. ”

"Positive solution!" The most common form of the "colon affirmative" script is shell script (shell scripts), also known as batch files (batch file) in non-UNIX-class operating systems. ”

"Batch files are familiar, shell scripts sound strange." The comma muttered.

"That's because you grew up in the world of windows and didn't listen to the dialect of Unix. "The colon nail reason," the operating system's core is called the kernel (kernel), which is not directly interacting with the user for security reasons, so it wraps up a shell (the shell), the command-line interpreter (command line interpreter) that people often say. A shell script is a script that runs on the shell, extending commands that can be executed under the command line. It is primarily a combination of built-in (built-in) commands, for System program scheduling, is the system administrator's necessary weapons. Since then, shell scripts have evolved to be used for application scheduling, connectivity, debugging, and so on, to become bonding (glue) languages. ”

The comma can not help but doubt: "is not the general programming language such as C can't do this?" ”

Quotation marks respond: "These languages usually require the process of writing-compiling-linking-running, which is tedious." Script language can be written to run, faster and more convenient. ”

The colon nodded: "Yes, since the script is mainly used to consolidate other programs, itself does not occupy too much resources, and logic is not too complex, so script language focus on simplicity, practical, grammatical requirements are not so strict, performance requirements are not high." In addition to shell scripts, there are some languages or tools dedicated to text processing (processing) such as awk, SED, and grep, which are used to read and write configuration files and log files, filter the input and output of various programs, and are also useful for consolidating programs. As the demand for scripting languages grows, so do advanced scripting languages like Perl. Based on shell script, AWK, and SED, Perl blends the features of imperative C and Functional Lisp, becoming one of the most popular scripting languages. ”

The question mark notes: "JavaScript is a browser-side script, and the antecedents seem somewhat different." ”

The colon explains: "In addition to command-line programs, scripting languages are also frequently present in other applications, such as graphical interface applications, multimedia applications, network applications, etc." In particular, Web applications have become the most fertile soil for the breeding and prosperity of scripting languages. For example: Perl is very widely used for Web server-side CGI programming; PHP is a language designed for dynamic Web pages; Ruby is the same age as Java, but it really started to get popular thanks to the success of Ruby on Rails in the Web application framework; As for JavaScript, The language that has long been marginalized as a web designer is Web2.0 's new favorite Ajax that really brings it into the programmer's eye. ”

The comma is somewhat curious: "When did the scripting language become a dynamic language?" ”

"Not all scripting languages can be called dynamic languages, although the latter does not have an exact definition." "The colon answers," from a usage perspective, a scripting language, if it is no longer limited to command-line tools and glue tools, develops from a proprietary language to a common language and is capable of complex application development, may be more qualified as a dynamic language. ”

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.