脚本语言和其他语言有什么区别 [英] What is difference between scripting languages and other languages

查看:52
本文介绍了脚本语言和其他语言有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能的重复:
何时将一种语言视为脚本语言?

我真的很困惑不同类型的语言.任何人都可以指导什么是不同类型的语言或不同的类别.

I am really confused between different types of languages. Can any one guide what are diff types of languages or diff categories.

就像有人说 python 是脚本语言.这是什么意思.其他语言如 php , asp , java 不是脚本语言

Like some saying python is scripting langauge. Now what does that mean. Are other langueages like php , asp , java not scripting langauges

推荐答案

脚本语言"这个名称适用于一个非常具体的角色:您编写命令以发送到现有软件应用程序的语言.(就像传统的电视或电影剧本")

The name "Scripting language" applies to a very specific role: the language which you write commands to send to an existing software application. (like a traditional tv or movie "script")

例如,曾几何时,HTML 网页很无聊.他们总是静止的.然后有一天,Netscape 想:嘿,如果我们让浏览器读取页面中的小命令并对其执行操作会怎么样?"就这样,Javascript 就形成了.

For example, once upon a time, HTML web pages were boring. They were always static. Then one day, Netscape thought, "Hey, what if we let the browser read and act on little commands in the page?" And like that, Javascript was formed.

一个简单的 javascript 命令是 alert() 命令,它指示/命令正在读取网页的浏览器(软件应用程序)显示警报.

A simple javascript command is the alert() command, which instructs/commands the browser (a software app) that is reading the webpage to display an alert.

现在,alert() 是否与 C++ 或浏览器实际使用来显示警报的任何代码语言有关?当然不是.在 .html 页面上编写alert()"的人不了解浏览器实际如何显示警报.他只是在写一个浏览器会解释的命令.

Now, does alert() related, in any way, to the C++ or whatever code language that the browser actually uses to display the alert? Of course not. Someone who writes "alert()" on an .html page has no understanding of how the browser actually displays the alert. He's just writing a command that the browser will interpret.

让我们看看简单的javascript代码

Let's see the simple javascript code

<script>
var x = 4
alert(x)
</script>

这些是发送到浏览器的指令,供浏览器自行解释.浏览器实际使用的编程语言将变量设置为 4,并将其放入警报中......它与 javascript 完全无关.

These are instructs that are sent to the browser, for the browser to interpret in itself. The programming language that the browser goes through to actually set a variable to 4, and put that in an alert...it is completely unrelated to javascript.

我们称最后一系列命令为脚本"(这就是为什么它包含在

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆