Principles of Programming Language: D.P.Sudeep Andhra University
Principles of Programming Language: D.P.Sudeep Andhra University
Principles of Programming Language: D.P.Sudeep Andhra University
Language
D.P.Sudeep
Andhra University
First Computer
The first programming language
●
Did you know that the first
programming language was
invented way back in 1843?
●
Ada Lovelace came up
with the first-ever machine
algorithm for an early
computing machine that she
wrote down on a piece of
paper because no computers
existed at the time!
Contd...
●
Algorithm for the Analytical Engine: Created by Ada
Lovelace for Charles Babbage’s Analytical Engine to
compute Bernoulli numbers, it’s considered to be the
first computer programming language.
History of Programming
Languages
1957: FORTRAN
●
FORmula TRANslation or FORTRAN was created by John Backus and is
considered to be the oldest programming language in use today.
●
The programming language was created for high-level scientific, mathematical,
and statistical computations.
●
FORTRAN is still in use today in some of the world’s most advanced
supercomputers.
●
FORTRAN was extremely
successful and was the dominant
language through the 1970s
●
1958: ALGOL (Algorithmic Language)
●
Algorithmic language or ALGOL was created by a joint
committee of American and European computer scientists.
●
ALGOL served as the starting point for the development of
some of the most important programming languages
including Pascal, C, C++, and Java.
●
Though Algol implemented some novel concepts, such as
recursive calling of functions, the next version of the
language, Algol 68, became bloated and difficult to use.
●
This lead to the adoption of smaller and more compact
languages, such as Pascal.
1958: LISP (List Processor)
●
List processor or LISP was invented by John
McCarthy at the Massachusetts Institue of Technology
(MIT).
●
Originally purposed for artificial intelligence, LISP is
one of the oldest programming languages still in use
today and can be used in the place of Ruby or Python.
Some of it’s applications include:
●
a)Game Playing
b)Automatic Machine Translation
1959: COBOL
●
Common Business Oriented Language (COBOL), is the
programming language behind many credit card processors,
ATMs, telephone and cell calls, hospital signals, and traffic
signals systems (just to name a few).
●
The development of the language was led by Dr. Grace
Murray Hopper and was designed so that it could run on all
brands and types of computers.
●
COBOL is still used to this day primarily for banking and
gamification systems.
●
The goal was to develop business applications using a
form of English-like text.
COBOL
Contd...
1964: BASIC
●
Beginners All-Purpose Symbolic Instruction Code or
BASIC was developed by a group of students at
Dartmouth College.
●
The language was written for students who did not
have a strong understanding of mathematics or
computers.
●
The language was developed further by Microsoft
founders Bill Gates and Paul Allen and became the
first marketable product of the company.
1970: PASCAL
●
All the code that was previously written in assembly language gets replaced
by the C language like operating system, kernel, and many other applications.
●
Many of the current leading languages are derivatives of C including; C#,
Java, JavaScript, Perl, PHP, and Python.
●
It also has been/still being used by huge companies like Google, Facebook,
and Apple.
1972: SQL (SEQUEL at the time)
●
C++ is used in MS Office, Adobe Photoshop, game
engines, and other high-performance software.
1983: Objective-C
●
Objective-C is the main programming language used
to write software for macOS and iOS, Apple’s
operating systems.
1987: Perl
●
Perl was created by Larry Wall and is a general-purpose,
high-level programming language.
●
It was originally designed as a scripting language
designed for text editing but nowadays it’s widely used
for many purposes such as database applications, system
administration, and graphic programming.
●
Its purpose was to make report processing easier. It is
now widely used for many purposes, including Linux
system administration, Web development, and network
programming.
1991: Python
●
Named after the British comedy troupe ‘Monty Python’,
Python was developed by Guido Van Rossum.
●
It is a general-purpose, high-level programming
language created to support a variety of programming
styles and be fun to use (a number of the tutorials,
samples, and instructions often contain Monty Python
references).
●
Python is, to this day, one of the most popular
programming languages in the world is used by
companies such as Google, yahoo, and Spotify.
1995: Java
●
Java: originally called Oak, is a general-purpose,
high-level language created by James Gosling for an
interactive TV project.
●
It has cross-platform functionality and is consistently
among the top of the world’s most popular
programming languages.
●
Java can be found everywhere, from computers to
smartphones to parking meters.
Programming Domains
Scientific applications
●
These applications are characterized by the solution of
various mathematical equations, solving differential or
integral functions and generating statistics.
●
FORTRAN has always been the dominant language in
this domain.
●
It’s synatx has alwyas been close to mathematics, and
scientists find it easy to use.
Programming Domains
Business applications
●
Business languages are characterized by facilities for producing
reports, precise ways of describing and storing decimal numbers and
character data, and ability to specify decimal arithmetic operations.
Use decimal numbers and characters.
●
●
COBOL is the first successful high-level language for those
applications.
●
The arrival of PCs started new ways for businesses to use
computers.
Spreadsheets and database systems were developed for business.
●
Programming Domains
Artificial intelligence
●
These programs are characterized by algorithms that
search through large data spaces.
For example: to play chess, the computer generates
●
Systems programming
●
The operating system and all of the programming support
tools of a computer system are collectively known as
systems software.
●
Web software
Eclectic collection of languages:
●
●
Scripting languages: Put a list of commands, called a
script, in a file to be executed.
●
PHP is a scripting language used on Web server
systems. Perl, JavaScript are other examples.
What is a Markup Language?
●
Markup languages are languages used by a computer to
annotate an electronic document.
●
These languages are readable by humans, which means that
they are usually written using standard words, instead of
technical programming language terminology.
●
Markup languages define the style and structure of a
document so that a computer knows how you want that
document to appear.
●
Usually markup will either specify how something should
be displayed or what something means.
Contd...
●
While several markup languages exist, the two most
popular are HTML and XML.
HTML is a markup language used for creating
●
webpages.
●
XML is used for storing structured data, rather than
formatting information on a page.
●
HTML tells a browser
application how a document
should look, XML describes
what’s in the document.
●
●
In other words, XML is concerned with how
information is organized, not how it is displayed.
Language Evaluation Criteria
●
The following factors influences Language evalution
criteria
1) Readability
●
2) Simplicity
●
3) Orthogonality
●
4) Writability
●
5) Reliability
●
6) Cost and
●
7) Others
●
Language Evaluation Criteria
Readability
●
One of the most important criteria for judging a programming
language is the ease with which programs can be read and
understood.
●
Language constructs were designed more from the point of view of
the computer than the users.
●
Since the ease of maintenance is determined in large part by the
readability of programs, readability became an important measure of
the quality of programs and programming languages.
●
The result is a crossover from focus on machine orientation to focus
on human orientation.
The most important criterion is “ease of use”.
●
Language Evaluation Criteria
Overall simplicity : “Strongly affects readability”
●
●
Language with too many features is more difficult to learn. Too
many features make the language difficult to learn. Programmers
tend to learn a subset of the language and ignore its other features.
●
Feature multiplicity is bad: “having more than one way to
accomplish a particular operation.”
For example: In Java, increment can be performed in four ways as:
●
➔
Count= count+1
➔
Count+=1
➔
Count++
➔
++count
Language Evaluation Criteria
●
Although the last two statements have slightly
different meaning from each other and from the others,
all four have the same meaning when used as stand-
alone expressions.
●
Operator overloading where a single operator symbol
has more than one meaning.
●
Although this is a useful feature, it can lead to reduced
readability if users are allowed to create their own
overloading and do not do it sensibly.
Language Evaluation Criteria
Orthogonality
●
●
The term Orthogonality refers to the attribute of being able to combine
various features of a language in all possible combinations, with every
combination being meaningful.
●
When the features of a language are orthogonal, the language is easier to
learn and programs are easier to write, beacuse there are fewer exceptions
and special cases to remember.
Makes the language easy to learn and read.
●
●
For example: Pointers should be able to point to any type of variable or
data structure.
●
The more orthogonal the design of a language, the fewer exceptions the
language rules require.
Language Evaluation Criteria
●
Orthogonolity is closely related to simplicity. The more orthogonal
the design of a language, the fewer exceptions the language rules
require.
Fewer exceptions mean a higher degree of regularity in the design,
●
●
Abstraction means the ability to define and then use complicated structures
or operations in ways that allow many of the details to be ignored.
●
A process abstraction is the use of a subprogram to implement a sort
algorithm that is required several times in a program instead of replicating
it in all places where it is needed.
Expressivity
●
●
It means that a language has relatively convenient, rather than
cumbersome, ways of specifying computations.
Ex:
●
++count
●
Writability
●
It is a measure of how easily a language can be used to create
programs for a chosen problem domain.
Most readability factors also apply to writability
●
●
Expressivity: It is easy to express program ideas in the
language.
a) In C, the notation C++ is more convenient and shorter than C
= C + 1.
b) The inclusion of for statement in Java makes writing
counting loops easier than the use of while.
Language Evaluation Criteria
Reliability
●
●
A program is said to be reliable if it performs to its specifications under all
conditions.
●
Type checking: is simply testing for type errors in a given program, either by the
compiler or during program execution.
●
The earlier the errors are detected, the less expensive it is to make the required
repairs. Java requires type checking of nearly all variables and expressions at compile
time.
Because run time type checking is expensive, compile time type checking is more
●
desirable.
Exception handling: the ability to intercept run-time errors, take corrective
●