Please elaborate the difference.
In simple terms, this is the difference:
Native Compiled language: You write your code, you run the compiler and the compiler turns it into machine instructions (raw bytes) that the CPU itself can read and execute.
Interpreted language: You are writing a script and handing it to another program which executes code on the script's behalf. This "other program" is called the interpreter or the engine and it itself is usually a native compiled program, hence it has to at some point give machine code to the CPU; everything does because that's the only way to actually get the computer to do anything. Simply put - a script is a set of instructions for a program to execute whereas a native binary is a set of instructions for your machine's CPU to execute.
The key here is that, since with scripting, you don't have to "compile to machine code," that's why when you write a script you don't have to "build" it; you can just feed it straight into the interpreter which speeds up the overhead of writing/testing code a bit. The downside is that the interpreter itself has overhead because many more steps are involved than simply the machine reading one compiled program.
If you want to see all this in action, get on Windows and write yourself a real basic javascript script. Now, download x64Dbg and open up `C:\Windows\System32\wscript.exe` in x64Dbg with commandline args to launch the javascript script you just wrote. You can actually trace the script's behavior in the wscript.exe binary and that's because the wscript.exe binary is following the instructions of the javascript file but the javascript file itself cannot at all tell the computer what to do directly. wscript.exe is an \__interpreter.
Whilst the answers so far have some interesting information, they're NOT pointing out the distinction I'm familiar with on the term.
See, scripting languages use SOURCE distribution. Not all interpreters do. UCSD Pascal, most ROM BASIC's and so forth are interpreted, BUT they are NOT scripting languages because their distribution model is the intermediate bytecode, NOT the raw source. Whilst ROM BASIC tricks users into THINKING it's source distribution -- it is not. When you enter a line of code it is turned into bytecode, when you "list' the program it is reverse engineered back into legible code.
PHP, JavaScript, shell scripts, and so forth when you deploy your code what you are deploying is the raw flat-text source code.
That's the distinction as I've understood it.
A "scripting language" is a subcategory of "programming languages", which generally refers to interpreted languages, as opposed to compiled languages. A compiled language is something which you compile to machine readable code, which is either straight up assembly code, or byte code, which has a closer correspondence to machine code, thus making it easier for the virtual machine to optimize either during compilation or during run time using a JIT (Just In Time) compiler.
In addition to other answers, "scripting language" often has the connotation of being a lightweight tool for automating a task quickly. Usually only the command line or a text editor is necessary to write a script; no compiler. Scripts may often only be a few lines long, such as a basic sed or awk script for transforming a text file. They often don't require a long list of imports. They are almost always loosely typed. The language will often provide simplified ways of completing common procedures, such as reading and writing to files, performing regex matching, or making a HTTP request. They can also be used as gluecode for automating tasks written in different languages.
Now, given that explanation, don't go thinking that scripting languages are any less capable than "programming" languages. Scripting languages can be used to write applications that are just as sophisticated and complex as compiled languages, often times in much less time.
Todd
Software Security TechLead
Md Zaid Imam
Let learning process continue | Principal Product Manager
Hope this matrix will help you Ankit Shukla