0% found this document useful (0 votes)
92 views3 pages

Compilation vs. Interpretation - Advantages and Disadvantages

The document discusses the differences between compilation and interpretation of programming languages. Compilation translates source code once into machine code that can be distributed, while interpretation translates source code each time it is run by an interpreter. Compiled code runs faster but requires the compiler, while interpreted code can run immediately but requires the interpreter. Due to these factors, languages are designed to be compiled or interpreted. There are few languages that support both.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views3 pages

Compilation vs. Interpretation - Advantages and Disadvantages

The document discusses the differences between compilation and interpretation of programming languages. Compilation translates source code once into machine code that can be distributed, while interpretation translates source code each time it is run by an interpreter. Compiled code runs faster but requires the compiler, while interpreted code can run immediately but requires the interpreter. Due to these factors, languages are designed to be compiled or interpreted. There are few languages that support both.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

COMPILATION - the source program is translated once (however, this act must be repeated each

time you modify the source code) by getting a file (e.g., an .exe file if the code is intended to be run
under MS Windows) containing the machine code; now you can distribute the file worldwide; the
program that performs this translation is called a compiler or translator;

INTERPRETATION - you (or any user of the code) can translate the source program each time it
has to be run; the program performing this kind of transformation is called an interpreter, as it
interprets the code every time it is intended to be executed; it also means that you cannot just
distribute the source code as-is, because the end-user also needs the interpreter to execute it.

Due to some very fundamental reasons, a particular high-level programming language is designed to
fall into one of these two categories.

There are very few languages that can be both compiled and interpreted. Usually, a programming
language is projected with this factor in its constructors' minds - will it be compiled or interpreted?

Compilation vs. interpretation - advantages and


disadvantages

COMPILATION INTERPRETATION
 the execution of the
translated code is
 you can run the code as soon
usually faster;
as you complete it - there are
 only the user has to
no additional phases of
have the compiler - the
translation;
end-user may use the
 the code is stored using
code without it;
programming language, not
ADVANTAGES  the translated code is
the machine one - this means
stored using machine
that it can be run on
language - as it is very
computers using different
hard to understand it,
machine languages; you don't
your own inventions and
compile your code separately
programming tricks are
for each different architecture.
likely to remain your
secret.
 the compilation itself
may be a very time-
 don't expect that
consuming process -
interpretation will ramp your
you may not be able to
code to high speed - your code
run your code
will share the computer's
DISADVANTAGE immediately after any
power with the interpreter, so
S amendment;
it can't be really fast;
 you have to have as
 both you and the end user
many compilers as
have to have the interpreter to
hardware platforms you
run your code.
want your code to be
run on.

What does this all mean for you?

 Python is an interpreted language. This means that it inherits all the described
advantages and disadvantages. Of course, it adds some of its unique features to
both sets.
 If you want to program in Python, you'll need the Python interpreter. You won't
be able to run your code without it. Fortunately, Python is free. This is one of its
most important advantages.

Due to historical reasons, languages designed to be utilized in the interpretation


manner are often called scripting languages, while the source programs encoded
using them are called scripts.

A hobby programming project


The circumstances in which Python was created are a bit puzzling. According to Guido van Rossum:

In December 1989, I was looking for a "hobby" programming project that would keep me occupied
during the week around Christmas. My office (...) would be closed, but I had a home computer, and
not much else on my hands. I decided to write an interpreter for the new scripting language I had
been thinking about lately: a descendant of ABC that would appeal to Unix/C hackers. I chose
Python as a working title for the project, being in a slightly irreverent mood (and a big fan of Monty
Python's Flying Circus).Guido van Rossum

Python goals
In 1999, Guido van Rossum defined his goals for Python:

 an easy and intuitive language just as powerful as those of the major competitors;


 open source, so anyone can contribute to its development;
 code that is as understandable as plain English;
 suitable for everyday tasks, allowing for short development times.

About 20 years later, it is clear that all these intentions have been fulfilled. Some sources say that
Python is the most popular programming language in the world, while others claim it's the third or the
fifth.

You might also like