Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When is a language considered a scripting language? [closed]

Simple. When I use it, it's a modern dynamic language, when you use it, it's merely a scripting language!


A scripting language is a language that "scripts" other things to do stuff. The primary focus isn't primarily building your own apps so much as getting an existing app to act the way you want, e.g. JavaScript for browsers, VBA for MS Office.


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.

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".


"A script is what you give the actors. A program is what you give the audience." -- Larry Wall

I really don't think there's much of a difference any more. The so-called "scripting" languages are often compiled -- just very quickly, and at runtime. And some of the "programming" languages are are further compiled at runtime as well (think of JIT) and the first stage of "compiling" is syntax checking and resource resolution.

Don't get hung up on it, it's really not important.