Você está na página 1de 2

An example of a compiled language is C++

It makes use of compilers i.e. translators that generate machine code from source code and not
interpreters (step by step executors of source code where no translation occurs. This implies
that the language is interpreted to run-time so the instructions are executed immediately. Any
errors in an interpreted program will result in the execution of the code to be stopped. A closer
look at the C++ language that is the compiled language reveals intermediate code generation,
code optimization and machine code generation. This results in a more efficient and faster
execution of the code.

Interpreted languages such as Python are generally portable across various hardware and
network platforms and scripts can be embedded in standard text documents for added
functionality.

They have a simple syntax which provide the following benefits to the user;

1. 1) Easy to learn and use

2. 2) Allows complex tasks to be done in few steps

3. 3) Allows addition of dynamic and interactive activities to web pages

Unlike a compiler the interpreter checks syntax and generates object code one source line at a
time. When an error is encountered the interpreter immediately feeds back information on the
type of error and stops interpreting the code thereby allowing the programmer to see instantly
the type of error as well as its location and make changes then have it reinterpreted.

Compilers analyze the whole entire program checking for errors as well as where they have
occurred and places them in an error diagnostic file and the programmer must then have to use
the error message to identify and add corrections.

Advantages of compiled languages are

1. Fast execution because they are translated directly to the native code of the specific
machine

2. Optimized for the target hardware

Disadvantages of compiled languages

1. Editing and deploying the code is a slower than interpreters

2. Error correction can be very time consuming and frustrating in cases where too many
errors arise
3. Require a compiler e.g. Code blocks

Advantages of Interpreted languages are

1. Easy to learn and use

2. Editing and running of code is fast

3. Allows complex tasks to be performed

4. Minimum programming knowledge and experience is required

Disadvantages of Interpreted languages

1. Run quite slowly

2. Limited access to low level and speed optimization code

3. Limited command to run detailed operations on graphics

Python has been successfully embedded in a number of software products as a scripting


language, including in finite element method software such as Abaqus, 3D parametric modeler
like FreeCAD and Games are mostly written in C++

Citations

Retrieved February 01, 2017, from https://en.wikipedia.org/wiki/Interpreted_language

Whats the difference between a compiled and interpreted language?Interpretation and


compilation are properties of the implementation of a language. (n.d.).

Retrieved February 01, 2017, from http://www.programmerinterview.com/index.php/general-


miscellaneous/whats-the-difference-between-a-compiled-and-an-interpreted-language/

Differences between compiled and Interpreted Languages. (n.d.). Retrieved February 01, 2017,
from http://www.codeproject.com/Articles/696764/Differences-between-compiled-
and-Interpreted-Langu

Você também pode gostar