Scripting languages are programming languages that people consider as scripting languages. It's an artificial category with no clear boundary, and where every proposed rule has an exception.
The classical rules used to say that a language is a scripting language are characterizing, not defining. If a language satisfies a number of the rules, there is a good chance it's considered a scripting language. If not, there's a good chance it's not. The rules usually include:
I would add:
That is, it could be an interpreted language.
If a programming language has significant "compile-time" behavior where it analyses the code and reports errors without running the program, like type errors from C, Java or C#, then it's most likely not considered a scripting language.
Traditionally a lot of scripting languages have been interpreted directly from source, but the more popular of them have gotten more performant implementations that precompile the code, like Python's .pyc
files, or optimizing JavaScript engines that compile to native code before running.
If the language could be implemented by an interpreter, which only looks at the source code as it is running it, then it's likely considered a scripting language. Whether it actually is implemented that way is not important, but if it can be, then it also can't require extensive compile-time error checking of the code.
If the language provides a useful static semantics which helps detect errors (other than syntax errors) without needing to run the program, it's probably not a scripting language.
There are always exceptions, usually based on tradition around a language more than any actual rule. BASIC is not usually considered a "scripting language", even though it satisfies pretty much all the criteria that anyone has ever used for being one. That's why Visual Basic Script had to add the "script" to the name, to distinguish itself from Visual Basic, a "real" programming language intended for larger programs.
BASIC is also an old programming language, like COBOL and Fortran, from before people expected static analysis from a language, and basically before "scripting languages" were even a thing.