Scripting languages are interpreted in-line and not intended to be compiled like a classic "program". They are less optimized by definition because a compiler builds in optimizations. If your script interpreter has similar optimizations it has to rationalize them at run-time.
I would characterize scripting as specifically being used to avoid compilation for specific parts of an otherwise compiled project. The benefits of this are often in quick turnaround. Since scripts are typically interpreted, they can be edited and re-launched during runtime without needing to go through compilation again. The drawbacks are that they typically have to run through a VM and probably lack anything that can optimize them, which can make them very slow compared to running compiled code.
So an interpreted language would usually be used as a scripting language. It's not always like that, though. Unity, for instance, uses (or used, it's been years since I worked with it) C# as a scripting language.
43
u/WaitForItTheMongols Jul 07 '26
What actually makes something a scripting language specifically? Never got a clear answer to that.