What is a scripting Language?
They are coding languages primarily defined by how their code is compiled into bytecode.
Instead of turning all of your code into machine-ready code for the VM at compile time, scripting languages compile code and execute it line by line.
In addition to their method of running, they typically give less control to the developer and simplify the process of coding.
"Bytecode is a low-level representation of code that’s typically generated by compilers or interpreters and processed by a virtual machine (VM) instead of a CPU or machine. Machines can’t understand bytecode, so instead, a virtual machine needs to process it and translate it into instructions for its hosting CPU."
— Codecademy
Scripting Languages Vs Programming Languages
| Scripting Languages | Programming Languages |
|---|---|
| Interpreted (line-by-line execution) | Compiled (transformed to machine code) |
| Easier syntax, simpler tasks | More complex and powerful syntax |
| Automation, web scripting, task automation | Full-fledged application development |
| Slower execution due to interpretation | Faster execution due to compilation |
| Highly flexible for rapid development | Can be more rigid but optimized for larger systems |
Table provided by GeeksforGeeks(1)
History Of Scripting Languages
The start of scripts began with early mainframe computers. These computers needed operating to physically interact with parts of the computer to swap active programs.
Early developers wanted to remotely change active programs without operators flipping switches and pushing buttons, and this resulted in the creation of shell scripts or command languages. While these aren't fully fledged languages, their influence brought upon the development of true scripting languages such as Lua or TCL
Why do we use them?
Their simplicity combined with their method of code compilation allows for easier program iteration. It is not required to compile the whole program just to improve upon a segment.
Due to the ease of access provided inherently, they are useful for quickly drafting programs that automate repetitive actions.
The development of neural networks and AI is a common application of scripting languages due to the amount of data that must be repetitively processed by learning algorithms.
Sources
1. Geeks For Geeks Script Language Introduction
2. What are programming vs. scripting languages?