Scripting Languages Flashcards
What is a scripting language?
A programming language that supports scripts: programs written for a special run-time environment that automate the execution of tasks that could alternatively be executed one-by-one by a human operator.
Scripting languages are often ___ (rather than ____).
interpreted, compiled
Scripting languages are often interpreted, rather than compiled.
What is a compiled language?
One where the program, once compiled, is expressed in the instructions of the target machine; this machine code is undecipherable by humans.
What is an interpreted language?
One where the instructions are not directly executed by the target machine, but instead read and executed by some other program (which normally is written in the language of the native machine).
How is code executed via compilation?
It is executed natively through the operating system after it is converted to machine code.
How is code executed via interpolation?
It is evaluated line by line through a program which handles executing the code instead of the operating system itself.
Can you easily classify a programming language as either compiled or interpreted?
Not usually- most programming languages have both compiled implementations and interpreted implementations. Languages are often referred to as one or the other for the sake of simplicity and clarity.
What is the major advantage of compiled languages over interpreted languages?
their execution speed.
Why are compiled languages usually faster than interpreted languages?
Because they are converted directly into machine code.
Why do lower-level languages tend to be compiled?
Because efficiency is usually more of a concern than cross-platform support. Also, because compiled languages are converted directly into machine code, this gives the developer much more control over hardware aspects such as memory management and CPU usage.
What are some examples of pure compiled languages?
C, C++, Erlang, Haskell, Rust, Go.
What is a pitfall of a compiled language?
You need to manually compile a program in order to run it.
What is a pitfall of a compiled language involving debugging?
While you debug the program, you need to recompile the program each time you want to test your new changes.
Are compiled languages platform-independent?
No, the compiled machine code is specific to the language that is executing it.
What is an example of a technology that is narrowing the execution time gap between interpreted and compiled languages?
just-in-time compilation.
What is just-in-time compilation?
Compilation done during execution of a program- at run time- rather than prior to execution.