Introduction to PL
Definition of PL
History
Purpose of PL
Characteristics of a good PL
Syntax of PL
Generations of PL
Levels of PL
Some Examples of PL
Why so many PLs
User : How to select a PL
2. Overview of Presentation
Introduction
Definition of PL
History
Purpose of PL
Characteristics of a good PL
Syntax of PL
Generations of PL
Levels of PL
Some Examples of PL
Why so many PLs
User : How to select a PL
Summary
References
2
11-03-2018PL - Programming Language
3. Introduction (Computer Program)
A set of instructions following the rules of the chosen
language
Without programs, computer are useless
A program is like recipe
It contains a list of ingredients (called variables) and a
list of directions (called statements) that tell the
computer what to do with the variables.
Computer programming :- the process of writing,
testing, debugging/troubleshooting, and maintaining
the source code of computer programs
This source code is written in a PL
3
11-03-2018
4. Introduction ( PL)
An artificial language*
A language consisting of binary string
Provides a way to assign a single name to a
collection of values of the same type
Gives a means to representing data structure and
algorithms
A notation for writing a program
PLs can be used to create computer programs
The term PL usually refer to high-level languages
4
11-03-2018*generally adapted to the specific needs
5. Definition of PL
An artificial language designed to communicate instructions to
a machine, particularly a computer
A vocabulary and set of predefined grammatical rules (syntax)
for instructing a computer to perform specific tasks
A language intended to be used by a person to express a
process by which a computer can solve a problem.
*person - programmer who serves as the source of the
communication
*Process – the activity being described by the program
*Computer – machine that will carry out the process
described by the program
*Problem – actual system or environment where the problem
arises
5
11-03-2018
6. History
6
11-03-2018
1940s
• Charles Babbage’s Difference Engine, which could only made to execute tasks by
changing the gears which executed the calculations.
• Thus earliest form of a computer language was Physical motion
1942
• Physical motion was replaced by the electrical signals when the U.S. Govt. Built the
ENIAC
1954-
57
• FORTRAN (FORmulae TRANslation) language was created by IBM Project(Directed
by John w.Backus)
1958 • LISP (LISt Processing) language was created by John McCarthy of MIT
1959
• COBOL (Common Business Oriented Language) was developed for business data
processing
1960
• Algol language was created by a committee for scientific use
• First language with a formal grammars
• Its next version Algol 68 is very difficult to use for general purpose programming
7. ..cont.. - History
7
11-03-2018
1964
• BASIC language was developed by Dr. John G. Kemeny and Thomas Kurtz at Dartmouth
• Objective :- to create a simplified computer language for teaching students how to program
• BASIC = Beginner’s All-purpose Symbolic Instruction Code
1966
• PL /1 (Programming Language one) was developed by IBM
• Objective :- to developed a common PL with multitasking feature to meet the requirements of both
scientific and commercial users
1968
• Pascal language was developed by Niklaus Wirth
• A good teaching tool for debugging and editing system
• Designed in a very orderly approach, combining many of the best features of the languages used in
that time like COBOL,FORTRAN, and ALGOL
1972
• C language was created by the Dennis M.Ritchie at AT and T’s Laborataries
• 1983 – C++ full-featured language was developed by BjarneStroustroup
1991
• Visual Basic was released by Microsoft for Windows
• Graphic version of BASIC that simplifies the writing of program for windows
1995
• JAVA language hit the scene
• Widely used truly object oriented PL
8. Purpose of PL
PLs were developed with one simple goal in mind
that to facilitate people to use the computers
without the need to know in detail, the internal
structure of the computer
We eventually need to convert our program into
machine language so that the computer can
understand it
8
11-03-2018
9. Characteristics of a good PL
What makes a good PL :-
Clarity, simplicity, and utility of language concept
Clarity of program syntax
Naturalness for application
Support for abstraction
Ease of program verification
Programming environment
Portability of programs
Cost of use : -execution
-translation
-creation, testing and use
- maintenance
9
11-03-2018
10. Syntax of PL
Form of components making up a program
Semantics :- logical meaning of statements
Purpose of Syntax
Readability
Write-ability
Ease of translation
Lack of Ambiguity
10
11-03-2018
11. Syntactic Elements of PL
Characters
Identifiers : string of letters and digits
Operators Symbols
Key and Reserved words : words in statements
Comments
Blanks
Delimiters and Brackets: marks beginning and end
Free and Fixed -Field formats : special meaning to positions
Expressions : basic statement building unit
Statements : basic program building unit
Overall program- Subprogram Structure :
- Separate subprograms (FORTRAN)
- Nested procedures (Pascal)
11
11-03-2018
12. Generations of PL
12
11-03-2018
• Low level languages(Machine language) e.g.- FORTRAN
• made up of entirely 1s and 0s
• Machine Orientation1GL
• Low level languages (Assembly language) e.g.- Algol-60
• uses symbolic addressing capabilities
• Application Orientation2GL
• High level languages e.g.- Pascal, C, Java
• Simplicity & efficiency (use everyday text and mathematical formulas)
3GL
• very high level languages e.g.- Ada
• Consist of statements similar to statements in a human language
• Used in database programming and scripts4GL
• Uses a Visual and Graphics interface e.g.- Prolog
• Used for AI Research, Logical Inference
5GL
14. Comparison
14
11-03-2018
Machine Language Assembly language High – level Language
•A collection of binary
digits or bits
•Computer’s native
language
A series of instructions
mnemonics that correspond
to a stream of executable
instructions
•Portable(machine
independent)
•Languages that favour
humans (closer to human
lang.)
Only language understood
by computers
When translated by
assembler, that Can be
loaded into memory and
executed
programs easier to
understand
Almost impossible for
humans to use
Use keywords and symbols,
much like English, to form a
PL
•language closer to problem
description
•Problem-oriented lang.
not require any translation Assembler is needed (A.L -
ML)
compiler or interpreter is
needed (H.L.L - ML)
more time to program less time to develop
programs
less time to develop
programs
*Mnemonics - Structured Commands
15. Example
15
11-03-2018
Move the hexadecimal value 61 (97 decimal)
into the processor register named “a1”
Machine language
10110000
01100001
Assembly lang.
mov a1, #061h
Compare the Complexity level of both language w.r.t. Human readability
16. High Level Language
Allow us to write computer code using instruction
resembling everyday spoken language (e.g. Print,
if, while) which are then translated into machine
language to be executed
Some PLs use a compiler to perform this
translation and others use an interpreter
HLL offers three significant advantages over ML :-
1. Simplicity
2. Uniformity
3. Portability
16
11-03-2018
17. Examples -HLL
17
11-03-2018
HLL Brief Description (with some application)
JAVA Truly open Source PL, Android, Website
C general-purpose HLL
C ++ general-purpose object-oriented programming (OOP), Games,
C # D & D by Microsoft, general-purpose object-oriented programming
Python Informatics, Scientific, Instragram, Youtube, Pinrest, Google Pro
Php Gen. Purpose lang., e-commerce, online games, website
Swift Apple company
Ruby dynamic, open source PL, elegant syntax, Online PL
Pascal Imperative and procedural PL
BASIC General-purpose HLL
PERL website
LISP Artificial intelligence
C#( C SHARP)
18. BASICS
Short for Beginner's All-purpose Symbolic
Instruction Code.
Developed in the 1950s for teaching University
students to program and provided with every self-
respecting personal computer in the 1980s,
BASIC has been the first programming language for
many programmers.
It is also the foundation for Visual Basic.
18
11-03-2018
19. Visual Basic
A programming language and environment
developed by Microsoft.
Based on the BASIC language, Visual Basic was
one of the first products to provide a graphical
programming environment and a paint metaphor for
developing user interfaces.
19
11-03-2018
20. C
Developed by Dennis Ritchie at Bell Labs in the mid
1970s.
C is much closer to assembly language than are
most other high-level languages.
The first major program written in C was the UNIX
operating system.
The low-level nature of C, however, can make the
language difficult to use for some types of
applications
20
11-03-2018
21. C++
A high-level programming language developed by
Bjarne Stroustrup at Bell Labs.
C++ adds object-oriented features to its
predecessor, C.
C++ is one of the most popular programming
language for graphical applications, such as those
that run in Windows and Macintosh environments
21
11-03-2018
22. PASCAL
A high-level programming language developed by
Niklaus Wirth in the late 1960s.
The language is named after Blaise Pascal, a
seventeenth-century French mathematician who
constructed one of the first mechanical adding
machines.
It is a popular teaching language
22
11-03-2018
23. JAVA
A high-level programming language developed by James
Gosling (Sun Microsystems)
Java was originally called OAK, and was designed for
handheld devices and set-top boxes.
Oak was unsuccessful so in 1995 Sun changed the
name to Java and modified the language to take
advantage of the burgeoning World Wide Web.
Java is a general purpose programming language with a
number of features that make the language well suited
for use on the World Wide Web
used to write Android apps
23
11-03-2018
24. Why so many PLs
It is the necessity
No PL can expect to predefine all the useful “types”
that we might need in a particular application
Some of these are created to serve a special purpose
(controlling a robot), while others are more flexible
general-purpose tools that are suitable for many
types of applications
Java script – Image, Video
C –Trading (like Stock mkt., )
Php - e-commerce, online games, website
Python - Informatics, Scientific, Instragram,
24
11-03-2018
25. User : How to select a PL
Before you decide on what language to use, you
should consider the following:
Your Interest, Requirement, Future plan
your server platform
the server software you run
your budget
previous experience in programming
the database you have chosen for your backend
25
11-03-2018
26. Conclusions
An artificial language designed to communicate
instructions to a machine, particularly a computer
earliest form of a computer language was Physical
motion
Physical motion was replaced by the electrical signals
with ENIAC
PL History :-
FORTRAN(1957),LISP(1958),COBOL(1959),
Algol(1960),BASIC(1964), PL/1(1966), Pascal(1968),
C(1972), Visual Basic(1991), JAVA(1995)............
Although there are over 2,000 computer languages,
relatively few are widely used
26
11-03-2018
27. References
Sammet, Jean E., Programming languages: history and fundamentals.
Prenticehall Inc:Englewood Cliffs, 1969
Tennent, R.D. Principles of programming languages. Prentice-Hall of
India Pvt
Ltd: New Delhi, 1988
Cutler, Donald I, Introduction to computer programming, Prentice-hall
Inc:Englewood Cliffs, 1972
INFLIBNET e-Pg Pathshala. (n.d.). student corner. Retrieved 10 26,
2017, from www.epgp.inflibnet.ac.in:
http://epgp.inflibnet.ac.in/ahl.php?csrno=21
https://www.britannica.com/technology/computer-programming-
language, accessed on 10 29,2017
27
11-03-2018