Sub Code: 210255
Principles of Programming Languages
By: Prof. S.N.Shelke
1
Good Thought
“ See for the highest,
aim at the highest,
And you shall reach the highest.”
3
Unit- I
Fundamentals of Programming
4
Unit – I Syllabus
• Importance of Studying Programming Languages, History of Programming
Languages, Impact of Programming Paradigms, Role of Programming
Languages, Programming Environments. Impact of Machine Architectures:
The operation of a computer, Virtual Computers and Binding Times.
• Programming paradigms- Introduction to programming paradigms,
Introduction to four main Programming paradigms- procedural, object
oriented, functional, and logic and rule based.
Text Books
• T. W. Pratt, M. V. Zelkowitz, "Programming Languages Design and
Implementationǁ, 4th Ed, PHI, ISBN 81-203-2035-2.
• Sebesta R., "Concepts of Programming Languages", 4th Edition, Pearson
Education, ISBN- 81-7808-161-X.
Importance of Studying Programming Languages
• To improve your ability to develop effective programming.
• To improve your existing programming knowledge.
• To improve your vocabulary of useful programming constructs.
• To allow better choice of programming language.
• Increased ability to learn new languages.
• To make easier new programming language.
• Increased capacity to express ideas.
History of Programming Languages
Very low-level languages
• Those are machine languages and assembly languages, machine-
dependent coding systems. They were initially fully binary, and then
symbolic.
• There is one native machine language, and usually one assembly language
per processor model.
• Upward compatibility .
Algol 60
• It was the first to have block structure, recursion, and a formal definition.
• It is not used now, but it is the ancestor of most contemporary languages.
• As far as design goes, Algol 60 was without doubt the most important
innovation in the history of programming languages
Cobol
• Business-oriented computations
– very strict program organization
– poor control structures
– elaborate data structures, record type introduced for the first time.
Used to be very popular in business and government, much less at
universities.
PL/I
• A combination of features believed (at the time) best in Fortran, Algol 60,
Cobol.
– the first language designed to be completely general, good for all
possible applications
– actively promoted by IBM
– not used much today.
• An interesting feature introduced in PL/I:
event handling.
Basic
• The first in history language of personal computing.
• The first programming language for many programmers: designed to be
easy to learn.
• Very simple, limited, though still general-purpose.
Simula 67
• An extension of Algol 60 designed for simulation of concurrent processes.
• Introduced the central concepts of object orientation: classes and
encapsulation.
• Predecessor of Smalltalk and C++.
• Now unused.
Algol 68
• A very elegant design, unmatched till today.
• Full orthogonality.
• Extremely difficult to implement.
• A very clever formal description, unfortunately hard to understand for most
potential users.
• Completely unused.
Pascal
• A conceptually simplified and cleaned-up successor of Algol 60.
• A great language for teaching structured programming.
• An excellent first language to learn: teaches good programming habits.
• Its later extensions (for example, Delphi) are full-fledged systems
programming packages, as powerful as any Java kit.
Modula-2
• A better, conceptually uniform successor of Pascal.
• Mechanisms to program concurrency (many processes running in parallel).
• Not used as much as it deserves.
• Its successors, Modula-3 and Oberon, are even more conceptually
appealing, practically useful—and almost not used at all. (They lost the
popularity contest with C++.)
Ada
• The result of an elaborate, multi-stage design process, and a more
successful attempt at generality than PL/I.
• Completely standard: there can be no dialects (like Java, except that
Microsoft...).
• There are, however, two standards: Ada 83 (the original), and Ada 95.
• Ada has been designed to support concurrency in a very neat, systematic
way.
C
• The implementation language of Unix.
• A great tool for systems programming and a software development
language on personal computers.
• Once fashionable, still in use, but usually superseded by C++.
• Dangerous if not used properly: not recommended to novice programmers.
• Relatively low-level.
LISP
• One of the earliest programming languages.
• Based on the concept of computing by evaluating functions. Very good for
symbolic computing.
• For years, the only language for Artificial Intelligence work. (Prolog is 12
years younger.)
• Many dialects, two standards (Scheme, Common Lisp).
• Nice programming environments.
• Lisp's successors are very elegant (Miranda, ML, Haskell) but not nearly as
widely used.
Prolog
• A very high-level programming language.
• Declarative, based on a subset of logic, with proofs interpreted as
computation.
• Very powerful:
– Non-deterministic (built-in backtracking).
– Elaborate, flexible pattern matching.
– Associative memory.
– Pattern-directed procedure invocation.
• In skilled hands, it is a very strong tool.
Smalltalk
• It is the purest object-oriented language ever designed (till now), cleaner
than Java, much cleaner than C++.
• Comes complete with a graphical interface and an integrated programming
environment.
• In skilled hands, a powerful tool.
C++
• An object-oriented extension of the imperative language C.
• This is a hybrid design, with object orientation added to a completely
different base language.
• Complicated syntax, difficult semantics.
• Very fashionable, very much in demand.
Java
• A neat, cleaned up, sized-down reworking of C++.
• Full object orientation (though not as consistent as Smalltalk)
• Designed for Internet programming, but general-purpose.
• It is said (not quite correctly) to be slow.
Scripting languages
• Text processing:
– Perl
– Python
• Web programming
– JavaScript
– PHP
Languages that merge programming paradigms
• Object-oriented extensions: not only C++, but dialects of Lisp (CLOS) or of
Prolog (XPCE/Prolog, Prolog++).
• Logic programming combined with functional programming (very clever, but
only experimental).
• Most languages are sequential: one processor, one process. Ada is a
language designed to support concurrency: many processes running in
parallel.
Prof. S. N. Shelke
(Assistant Professor)
Department of Computer Engineering
Sinhgad Academy of Engineering,
Kondhwa, Pune