Introduction To Scripting Languages | PDF | Scripting Language | Compiler
0% found this document useful (0 votes)
23 views

Introduction To Scripting Languages

Scripting languages are programming languages that are interpreted rather than compiled. They allow for the creation of scripts to automate tasks and integrate with other systems. Some popular scripting languages include Bash, Node.js, Ruby, Python, and Perl. Scripting languages have advantages like easy learning, fast editing, and interactivity. They are commonly used in web applications, system administration, games, and multimedia. The key difference between compilers and interpreters is that compilers convert entire programs to machine code before execution, while interpreters convert code line-by-line during execution.

Uploaded by

Ut Pearls
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Introduction To Scripting Languages

Scripting languages are programming languages that are interpreted rather than compiled. They allow for the creation of scripts to automate tasks and integrate with other systems. Some popular scripting languages include Bash, Node.js, Ruby, Python, and Perl. Scripting languages have advantages like easy learning, fast editing, and interactivity. They are commonly used in web applications, system administration, games, and multimedia. The key difference between compilers and interpreters is that compilers convert entire programs to machine code before execution, while interpreters convert code line-by-line during execution.

Uploaded by

Ut Pearls
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Introduction to Scripting Languages

All scripting languages are programming languages. The scripting language is basically a
language where instructions are written for a run time environment. They do not require the
compilation step and are rather interpreted. It brings new functions to applications and glue
complex system together. A scripting language is a programming language designed for
integrating and communicating with other programming languages.
There are many scripting languages some of them are discussed below:
bash: It is a scripting language to work in the Linux interface. It is a lot easier to use bash to
create scripts than other programming languages. It describes the tools to use and code in the
command line and create useful reusable scripts and conserve documentation for other people
to work with.
Node js: It is a framework to write network applications using JavaScript. Corporate users of
Node.js include IBM, LinkedIn, Microsoft, Netflix, PayPal, Yahoo for real-time web applications.
Ruby: There are a lot of reasons to learn Ruby programming language. Ruby’s flexibility has
allowed developers to create innovative software. It is a scripting language which is great for
web development.
Python: It is easy, free and open source. It supports procedure-oriented programming and
object-oriented programming. Python is an interpreted language with dynamic semantics and
huge lines of code are scripted and is currently the most hyped language among developers.
Perl: A scripting language with innovative features to make it different and popular. Found on
all windows and Linux servers. It helps in text manipulation tasks. High traffic websites that use
Perl extensively include priceline.com, IMDB.
Advantages of scripting languages:
Easy learning: The user can learn to code in scripting languages quickly, not much knowledge of
web technology is required.
Fast editing: It is highly efficient with the limited number of data structures and variables to
use.
Interactivity: It helps in adding visualization interfaces and combinations in web pages. Modern
web pages demand the use of scripting languages. To create enhanced web pages, fascinated
visual description which includes background and foreground colors and so on.
Functionality: There are different libraries which are part of different scripting languages. They
help in creating new applications in web browsers and are different from normal programming
languages.
Application of Scripting Languages: Scripting languages are used in many areas:
 Scripting languages are used in web applications. It is used in server side as well as
client side. Server side scripting languages are: JavaScript, PHP, Perl etc. and client side
scripting languages are: JavaScript, AJAX, jQuery etc.
 Scripting languages are used in system administration. For example: Shell, Perl, Python
scripts etc.
 It is used in Games application and Multimedia.
 It is used to create plugins and extensions for existing applications.

Compiler and Interpreter


What is Compiler?
A compiler is a computer program that transforms code written in a high-level programming
language into the machine code. It is a program which translates the human-readable code to a
language a computer processor understands (binary 1 and 0 bits). The computer processes the
machine code to perform the corresponding tasks.
A compiler should comply with the syntax rule of that programming language in which it is
written. However, the compiler is only a program and can not fix errors found in that program.
So, if you make a mistake, you need to make changes in the syntax of your program. Otherwise,
it will not compile.

What is Interpreter?
An interpreter is a computer program, which converts each high-level program statement into
the machine code. This includes source code, pre-compiled code, and scripts. Both compiler
and interpreters do the same job which is converting higher level programming language to
machine code. However, a compiler will convert the code into machine code (create an exe)
before program run. Interpreters convert code into machine code when the program is run.

Difference between Compiler and Interpreter


Here are important difference between Compiler and Interpreter:

Basis of
Compiler Interpreter
difference

Programming  Create the program.  Create the Program


Steps
 Compile will parse or analyses all of the  No linking of files or machine
language statements for its correctness.
Basis of
Compiler Interpreter
difference

If incorrect, throws an error


 If no error, the compiler will convert
code generation
source code to machine code.
 Source statements executed
 It links different code files into a
line by line DURING Execution
runnable program(know as exe)
 Run the Program

The program code is already translated into


Interpreters are easier to use,
Advantage machine code. Thus, it code execution time is
especially for beginners.
less.

Interpreted programs can run on


You can’t change the program without going
Disadvantage computers that have the
back to the source code.
corresponding interpreter.

Store machine language as machine code on the


Machine code Not saving machine code at all.
disk

Running time Compiled code run faster Interpreted code run slower

It is based on language translation linking-


Model It is based on Interpretation Method.
loading model.

Generates output program (in the form of exe) Do not generate output program. So
Program
which can be run independently from the they evaluate the source program at
generation
original program. every time during execution.

Program execution is separate from the Program Execution is a part of


Execution compilation. It performed only after the entire Interpretation process, so it is
output program is compiled. performed line by line.

Memory Target program execute independently and do The interpreter exists in the memory
requirement not require the compiler in the memory. during interpretation.

Best suited for Bounded to the specific target machine and For web environments, where load
cannot be ported. C and C++ are a most popular times are important. Due to all the
programming language which uses compilation exhaustive analysis is done, compiles
model. take relatively larger time to compile
even small code that may not be run
multiple times. In such cases,
Basis of
Compiler Interpreter
difference

interpreters are better.

The compiler sees the entire code upfront. Interpreters see code line by line, and
Code
Hence, they perform lots of optimizations that thus optimizations are not as robust
Optimization
make code run faster as compilers

Dynamic Difficult to implement as compilers cannot Interpreted languages support


Typing predict what happens at turn time. Dynamic Typing

It is best suited for the program and


Usage It is best suited for the Production Environment
development environment.

The interpreter reads a single


Compiler displays all errors and warning at the
statement and shows the error if any.
Error execution compilation time. Therefore, you can’t run the
You must correct the error to
program without fixing errors
interpret next line.

Input It takes an entire program It takes a single line of code.

Compliers generates intermediate machine Interpreter never generate any


Output
code. intermediate machine code.

Display all errors after, compilation, all at the Displays all errors of each line one by
Errors
same time. one.

Pertaining
Programming C, C++, C#, Java all use complier. PHP, Perl, Ruby uses an interpreter.
languages

You might also like