Main difference between a programming langage from a scripting language

The primary difference between a "programming language" (C, C++, VB etc.) and a "scripting language" (PHP, ASP, JSP, JavaScript, VBScript)is that code written in a programming language needs to be compiled before it is run. Once it is compiled, it can be run any number of times.

Scripting languages, on the other hand, are interpreted at run-time. This means that every time you want to run the program, a separate program needs to read the code, interpret it, and then follow the instructions in the code. Compiled code has already been interpreted into machine language, so it is will typically execute faster because the conversion into machine language has already been done.

Markup languages (HTML, XML) are somewhat different from both of the others. A markup language is simply a set of tags that are used to "mark up" text documents so that sections of text can be logically arranged and labeled. These documents can be viewed as plain text, or, more commonly, are viewed through a browser. The browser parses the document, looking for markup tags, and it then arranges the text and/or formats it according to the values in the tags.


兩者最大的區別是運行機理上的差異:

腳本程序運行的時候需要母程序進行解釋,然後才能運行。而程序語言不需要母程序,直接二進制代碼運行。



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章