Вы находитесь на странице: 1из 22

PROGRAMMING

LANGUAGES
LECTURE 1 - INTRODUCTION OF
PROGRAMMING LANGUAGES
 is a set of rules that provides a way of telling a
What is computer what operations to perform
Programming  is a set of rules for communicating an
Languages ? algorithm
 it provides a linguistic framework for
describing computations
 is a notational system for describing
computation in a machine-readable and
human-readable form.
 is a tool for developing executable models for
a class of problem domains
 the a natural language is English
What is  it has words, symbols and grammatical rules.
Programming  also has words, symbols and rules of
Languages ? grammar.
 the grammatical rules are called syntax.
 each programming language has a different
set of syntax rules.
 is a notation designed to connect instructions
to a machine or computer
 mainly used to control the performance of a
machine or to express algorithm
• Programming languages have evolved over
time as better ways have been developed to Why are there so
design them. many Programming
Languages?
 First programming languages were
developed in the 1950s
 Since then thousands of languages have
been developed
High Level PL
• Different programming languages are designed
for different types of programs.
• Programming Languages Levels Low Level PL

Executable
Machine Code
Types of Programming Languages

Machine Languages
First Generation Languages
 Operation code – such as addition or subtraction.
 Operands – that identify the data to be processed.
 Machine language is machine dependent as it is the
only language the computer can understand
 Very efficient code but very difficult to write.
Types of Programming Languages

Assembly Languages
First Generation Languages • Symbolic operation codes replaced binary operation
• Codes
Second Generation Languages • Assembly language programs needed to be
“assembled” for execution by the computer. Each
assembly language instruction is translated into one
machine language
• instruction.
• Very efficient code and easier to write.
Types of Programming Languages

 Closer to English but included simple mathematical


First Generation Languages
notation.
 Programs written in source code which must
Second Generation Languages be translated into machine language programs
called object code.
Third Generation Languages  The translation of source code to object code
is accomplished by a machine language
system program called a compiler.
Types of Programming Languages

 Alternative to compilation is interpretation which is


First Generation Languages
accomplished by a system program called an
interpreter.
Second Generation Languages  Common third generation languages
 FORTRAN
Third Generation Languages  COBOL
 C and C++
 Visual Basic
Types of Programming Languages

 A high level language that requires fewer


First Generation Languages instructions to accomplish a task than a third
generation language.
Second Generation Languages
 Used with databases
Third Generation Languages
 Query languages
 Report generators
 Forms designers
Fourth Generation Languages
 Application generators
Types of Programming Languages

 Declarative languages
First Generation Languages
 Functional(?): Lisp, Scheme, SML
Second Generation Languages  Also called applicative
 This type of PL is a function
Third Generation Languages
 Logic: Prolog
 Based on mathematical Logic
Fourth Generation Languages
 Rule – base or Constraint – base

Fifth Generation Languages


• Traditional programming Two broad Groups of
Languages Programming
 Sequential of instruction Languages
 First , second and some third generation
programming languages

• Object
– Oriented Programming
Languages
 Object are created rather then sequences
of instructions
 Some of third , fourth , and fifth
programming languages
Criteria in a 1 Writability
good language
design
The quality of a language that
enables a programmer to use it
to express a computation
clearly, correctly, concisely, and
quickly.
Criteria in a 1 Writability
good language
design 2 Readability

The quality of a language that


enables a programmer to
understand and comprehend the
nature of a computation easily and
accurately.
Criteria in a
The quality of a
1 Writability
good language language that
design features 2 Readability
provided have as
few restrictions 3 Orthogonality
as possible and
be combinable in
any meaningful
way.
Criteria in a 1 Writability
good language The quality of a
design language that
assures a
2 Readability
program will not
behave in
3 Orthogonality
unexpected or
disastrous ways 4 Reliability
during execution..
Criteria in a 1 Writability
good language The quality of a
design language that
eases errors can
2 Readability
be found and
corrected and
3 Orthogonality
new features
added. 4 Reliability

5 Maintainability
Criteria in a 6 Generality
good language
design
The quality of a language that avoids
special cases in the availability or use
of constructs and by combining closely
related constructs into a single more
general one.
Criteria in a 6 Generality
good language
design 7 Uniformity

The quality of a language that


similar features should look
similar and behave similar.
Criteria in a 6 Generality
good language
design
The quality of a
language that
7 Uniformity
provides some
general
8 Extensibility
mechanism for
the user to add
new constructs to
a language.
Criteria in a
The quality of a
6 Generality
good language language that
design allows programs 7 Uniformity
written to be
transported from 8 Extensibility
one computer to
another without 9 Standardability
significant change
in language
structure.
Criteria in a
The quality of a
6 Generality
good language language that
design provides a 7 Uniformity
translator or
interpreter can be 8 Extensibility
written. This can
address to 9 Standardability
complexity of the
language
definition.
10 Implementability

Вам также может понравиться