PROGRAMMING LANGUAGES ignou BCA 3rd semester notes

The primitive or the first generation of programming languages were called machine languages and the symbols like ‘0’ and ‘1’ were used to write programs under this category of programming languages. The second generation of programming languages were called the assembly languages and mainly used mnemonics to
construct a program. Both of these generations of programming languages were CPU
dependent i.e., every type of a CPU will have its own machine and assembly
language. The third generation of programming languages was called high level
languages as these programming languages were independent of the CPU of the
hardware being used and the instructions written in the programs were just like the
instructions given in natural languages. The third generation languages are known as
3GL languages. The current generation of the programming languages are called the
fourth generation languages or the 4GLs. These languages represent the class of
programming languages that are closest to the human (natural) languages.
Based on the intended use of domain of use, the programming languages are broadly
classified as imperative programming languages where imperative sentences are used
in a program to issue commands in terms of instructions; and declarative
programming languages where declarative instructions are used in a program to assert
the desired result. But a more common paradigm classifies these languages into
imperative, functional, logic programming and object-oriented languages. Table 1.1
presents the summary of main features of these programming paradigms.

Table 1.1: Summary of Main Features of Programming Paradigms
Paradigm Key
Concepts
Program Program Execution Result
Imperative Command
(instruction)
Sequence of commands Execution of commands Final state of computer memory
Functional Function Collection of functions Evaluation of functions Value of the main function
Logic Predicate Logic formulas:
axioms & a theorem
Logic proving of the theorem Failure or Success of proving
Objectoriented Object Collection of classes of objects
Exchange of messages between the objects
Final state of the objects
Object Oriented
Programming
Table 1.2 shows some of the examples of programming Paradigms.
Table 1.2: Programming Languages under Programming Paradigms
Paradigm Example
Imperative Algol, Pascal, C, Ada
Functional Lisp, Refal, Planner, Scheme
Logic Prolog
Objectoriented
Smalltalk, Eiffel, C++, Java
There exist certain programming languages that inherit the features of more than one
paradigms and the examples of some modern programming languages are presented in
Table 1.3.
Table 1.3: Programming Languages under Two Programming Paradigms
Paradigms Example
Imperative + Objectoriented
Object Pascal, C++, Java, Ada95
Functional + Objectoriented
Clos Logic + Object-oriented Object Prolog

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

error: Content is protected !!