You are on page 1of 4

Comparison of Compiler & Interpreter

Compiler:
The characteristics of compiler are given as, The compiled code is totally in binary (machine) language. Compiler executed the program fast and it spends a lot time to analyze and to process the program. The compiler itself is a computer program written usually in some implementation language. Once we compiled a program then we can run it anytime we want. The compiler is only loaded into memory during compilation phase and so only the machine (binary) code is resident in memory during runtime. It is not easy to made changes in the compiled program because we have to re-compile that whole program after making changes. The compiled program can only be executed on that machine for which it is compiled. In other words we can say it is machine dependent. Compiler first reads the entire program, checks it for errors, compiles it and execute it. Compiler creates the list of errors after completing the compilation process. Compiled code is better for serious applications.

Computer hardware executes the compiled code.

Interpreter:
The characteristics of interpreter of same topics (as discussed above in compiler) are described below as, After interpreting the resulting code is some sort of intermediate code. Interpreters program execution speed is slow but it spends a little time to analyze and to process the program. We will have to re-interpret the program every time when we want to run that program. The interpreter is loaded in memory so, less memory is available during execution. It is easier to made changes in interpreted program. Interpreted program is not machine dependent because the machine dependent part is in the interpreter itself. Interpreter reads a line, checks it for errors and executes it then reads the next line. The interpreter stops after detecting first error during interpreting phase. When we remove that first error then it interpret further lines. Interpreted code is better for simple applications. (Simple applications are those which are to be used for once, twice or for prototyping).

Interpreted code is executed by other program not by computer hardware.

Comparison of Object Oriented Programming & Procedural Programming Languages


Object Oriented Programming:
The characteristics of O.O.P Languages are given as, OOPLS means Object Oriented Programming Languages and Systems and are different from the Structural programming. In the fact that in OOPS programming you take advantage of polymorphism, multiple inheritance, abstraction and encapsulation of the data. Object oriented programming languages provide your software system with the maximum flexibility. Object oriented programming languages have ability to simulate real-world event much more effectively. Object oriented programming language code is reusable thus less code may have to be written. Object oriented programming follows bottom up approach it means that everything is wrapped in object (classes) so these classes are building blocks of your application. In object oriented languages, the objects communicate with each

other via Functions. Object oriented programming languages are JAVA, VB.NET, C#.NET etc.

Procedural Programming:
The characteristics of procedural languages are given below, Procedural programming creates a step by step program that guides the application through a sequence of instructions. Each instruction is executed in order. In procedural programming languages, its possible to expose Data and/or variables to the external entities which is strictly restricted in object oriented languages. There is no communication between objects in procedural programming language. Procedural languages follow top down approach it means flow starts from main and goes through functions or function calls. Procedural programming languages are C, VB, Perl, Basic, FORTRAN etc.

You might also like