什么时候将一种语言视为脚本语言? [英] When is a language considered a scripting language?

查看:58
本文介绍了什么时候将一种语言视为脚本语言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是什么使语言成为脚本语言?我听说有些人说当它被解释而不是编译时".这将使 PHP(例如)成为一种脚本语言.这是唯一的标准吗?还是有其他标准?

What makes a language a scripting language? I've heard some people say "when it gets interpreted instead of compiled". That would make PHP (for example) a scripting language. Is that the only criterion? Or are there other criteria?

推荐答案

传统上,当谈论脚本与编程的区别时,脚本是被解释的,程序是被编译的.一种语言可以以不同的方式执行 - 解释或编译(字节码或机器代码).这不会使语言成为一种或另一种语言.

Traditionally, when talking about the difference about scripting versus programming, scripts are interpreted and programs are compiled. A language can be executed in different ways - interpreted or compiled (to bytecode or machine code). This does not make a language one or another.

在某些人看来,你使用一种语言的方式使它成为一种脚本语言(例如,主要用 C++ 开发的游戏开发者会脚本用 Lua 编写对象).再次,界限变得模糊 - 一种语言可以被一个人用于编程,而同一种语言可以被另一个人用于脚本语言.

In some eyes, the way you use a language makes it a scripting language (for example, game developers who develop mainly in C++ will script the objects in Lua). Again, the lines are blurred - a language can be used for a programming by one person and the same language can be used for scripting language by another.

这是来自维基百科关于脚本语言的文章:

This is from the wikipedia article about scripting languages:

脚本语言、脚本语言或扩展语言是一种允许控制一个或多个软件应用程序的编程语言.脚本"不同于应用程序的核心代码,因为它们通常用不同的语言编写,并且通常由最终用户创建或至少修改.脚本通常从源代码或字节码解释,而它们控制的应用程序传统上被编译为本机机器代码.脚本语言几乎总是嵌入在它们控制的应用程序中.

A scripting language, script language or extension language is a programming language that allows control of one or more software applications. "Scripts" are distinct from the core code of the application, as they are usually written in a different language and are often created or at least modified by the end-user. Scripts are often interpreted from source code or bytecode, whereas the applications they control are traditionally compiled to native machine code. Scripting languages are nearly always embedded in the applications they control.

您会注意到通常"、经常"、传统"和几乎总是"的使用——这些都告诉您没有一组不同的属性可以构成特定语言一种脚本语言".

You will notice the use of "usually", "often", "traditionally" and "nearly always" - these all tell you that there is no set of distinct attributes that make a specific language a "scripting language".

这篇关于什么时候将一种语言视为脚本语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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