Week 2 Evolution of Programming Languages: IPT101 Integrative Programming Technologies I

Download as pdf or txt
Download as pdf or txt
You are on page 1of 43

WEEK 2

Evolution of
Programming languages
IPT101
INTEGRATIVE PROGRAMMING TECHNOLOGIES I
WEEK 2 Evolution of Programming languages

Fortran
• IBM Mathematical Formula Translating System, later popularly know as Fortran.

• Originally developed by a team lead by John Backus at IBM in the 1950s for scientific
and engineering applications on the IBM704, introduced in 1954.

• General-purpose, procedural, imperative programming language that is especially


suited to numeric computation and scientific computing.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 2


WEEK 2 Evolution of Programming languages

• Features introduced by earlier versions of Fortran:


• Comments
• Assignment statement using complex expressions
• Control structures (conditional, loop)
• Subroutines and functions used similarly to the mathematical notion of function
• Formatting of input/output
• Machine independent code
• Procedural programming
• Arrays
• Early development of compilers
• Showed the importance/possibility/relevance of higher-level programming languages
• Compiler development tools/techniques
• Optimizing compiler

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 3


WEEK 2 Evolution of Programming languages

COBOL
• Acronym for COmmon Business-Oriented Language

• Primary domain in business, finance, and administrative systems.


• A specification of COBOL was initially created during the second half of 1959 by Grace
Hopper.

• The specifications were to a great extent inspired by the Grace Hopper’s FLOW-MATIC
and IBM’s COMTRAN languages.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 4


WEEK 2 Evolution of Programming languages

LISP
• Lisp was created by John McCarthy in 1958 as a practical mathematical notation for
computer programs, influenced by the notation of Alonzo Church's lambda calculus.
• Lisp pioneered many ideas in computer science, including:
• functional programming
• tree data structures
• automatic storage management
• dynamic typing
• self-hosting compiler

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 5


WEEK 2 Evolution of Programming languages

• LISP was designed by McCarthy as a language to express symbolic computations, i.e. programs that
aim at manipulating mathematical expressions, for example:
• simplification of expressions
• differentiation and integration
• polynomial factorization

• Some of the requirements for such a language was the availability of:
• recursion: lambda calculus uses recursion pervasively
• linked lists: to implement lambda calculus, which implied dynamic memory allocation and deallocation.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 6


WEEK 2 Evolution of Programming languages

ALGOL
• ALGOL (ALGOrithmic Language) is a family of imperative computer programming
languages originally developed in the mid 1950s that greatly influenced many other
programming languages.
• Introduced by a joint committee of American (ACM) and European (GAMM) experts .
• GAMM: Gesellschaft für Angewandte Mathematik und Mechanik ("Society of Applied
Mathematics and Mechanics")
• ACM: Association for Computing Machinery

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 7


WEEK 2 Evolution of Programming languages

• According to John Backus, the original goals of the original meeting in ETH Zurich were:
• To provide a means of communicating numerical methods and other procedures between people
• To provide a means of realizing a stated process on a variety of machines.

• Original objectives of Algol:


• Machine independence
• As close as possible to mathematical notation
• Usable for the description of algorithms in publications
• Easily translatable to machine instructions
• Avoid some of the perceived problems with FORTRAN
• Language simplicity

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 8


WEEK 2 Evolution of Programming languages

PL/I
• With Fortran and Cobol, there were two distinct “kinds” of programmers. Fortran
emphasized floating point arithmetic, arrays, procedures, fast computation. Cobol
emphasized decimal arithmetic, fast asynchronous input/output, string handling,
efficient search/sort routines.
• When IBM designed the famous IBM360 computer, it saw the opportunity to design a
new general-purpose language designed specifically for it.
• This language was named PL/I (Programming Language 1). It was originally developed
in 1964-1966.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 9


WEEK 2 Evolution of Programming languages

• This created a language with very numerous features and requirements, including many innovative
ones:
• Reference data types
• User-defined data types
• Concurrency
• Dynamic arrays
• Auto-correcting compiler
• String handling
• Machine independence
• Efficiency
• Exception handling
• I/O control system
• Report-generation
• Recursion

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 10


WEEK 2 Evolution of Programming languages

PASCAL
• Pascal is a very influential imperative and procedural programming language,
designed in 1968-1969 and published in 1970 by Niklaus Wirth.

• Small and efficient language intended to encourage good programming practices


using structured programming and data structuring.
• Pascal is based on the ALGOL-60 programming language and named in honor of the
French mathematician and philosopher Blaise Pascal.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 11


WEEK 2 Evolution of Programming languages

• Pascal, in its original form, is a purely procedural language and includes the traditional array of ALGOL-
60 control structures.

• Pascal also has many data structuring facilities and other abstractions which were not included in the
original ALGOL 60, such as:
• user-defined type definitions
• records
• case statement
• pointers
• enumerations
• sets

• Such constructs were inspired from Simula 67, ALGOL 68, and Wirth and Hoare’s ALGOL W.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 12


WEEK 2 Evolution of Programming languages

SIMULA
• Simula was developed in the 1960s at the Norwegian Computing Center in Oslo, by
Ole-Johan Dahl and Kristen Nygaard.
• Syntactically, it is a superset of Algol 60.
• Simula 67 introduced objects, classes, subclasses, virtual methods, coroutines,
discrete event simulation, and featured garbage collection.

• Simula is considered the first object-oriented programming language.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 13


WEEK 2 Evolution of Programming languages

ISWIM
• ISWIM is an abstract computer programming language devised by Peter J. Landin and
first described in his article, The Next 700 Programming Languages, published in the
Communications of the ACM in 1966.
• The acronym stands for "If you See What I Mean".

• Although not implemented, it has proved very influential in the development of


subsequent programming languages, especially functional programming languages
such as SASL, Miranda, ML, Haskell and their successors.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 14


WEEK 2 Evolution of Programming languages

C
• C is a general-purpose programming language developed between 1969 and 1973 by
Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating
system.

• C has become one of the most popular programming languages. It is widely used on
many different software platforms, and there are few computer architectures for
which a C compiler does not exist. C has greatly influenced many other programming
languages, most notably C++, which originally began as an extension to C.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 15


WEEK 2 Evolution of Programming languages

• C was influenced by the languages BCPL and B (systems languages), who were
influenced by Algol and Fortran.

• C was originally designed in 1969-1972 with the following goals in mind:


• to be compiled using a relatively straightforward compiler
• to provide low-level access to memory
• to provide language constructs that map efficiently to machine instructions
• to require minimal run-time support

• In 1977-1979, portability emerged when portability of the Unix operating system was being
demonstrated.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 16


WEEK 2 Evolution of Programming languages

• C does not have some features that are available in some other programming languages:
• No direct assignment of arrays or strings
• No automatic garbage collection
• No requirement for bounds checking of arrays
• No operations on whole arrays
• No syntax for ranges, such as the A..B notation used in several languages
• No functions as parameters (only function and variable pointers)
• No exception handling
• Only rudimentary support for modular programming
• No compile-time polymorphism
• Only rudimentary support for generic programming (using macros)
• Limited support for encapsulation
• No native support for multithreading and networking

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 17


WEEK 2 Evolution of Programming languages

Smalltalk
• Smalltalk is an object-oriented, dynamically typed, reflective programming language.

• It was designed and created in part for educational use at the Learning Research
Group of Xerox PARC by Alan Kay, Dan Ingalls, Adele Goldberg, Ted Kaehler, Scott
Wallace, and others during the 1970s.
• Smalltalk emerged with Alan Kay’s great “Dynabook” insight, predicting the creation
of desktop and portable computers, and their availability to everyone.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 18


WEEK 2 Evolution of Programming languages

• A Smalltalk object can do exactly three things:


• Hold state (references to other objects).
• Receive a message from itself or another object.
• In the course of processing a message, send messages to itself or another object.

• The state an object holds is always private to that object.

• Other objects can query or change that state only by sending requests (messages) to the object to do
so.

• Alan Kay has commented that despite the attention given to objects, messaging is the most important
concept in Smalltalk.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 19


WEEK 2 Evolution of Programming languages

Ada
• Ada is a structured, statically typed, imperative, wide-spectrum, and object-oriented
high-level programming language, extended mainly from Pascal.
• Ada was originally designed by a team led by Jean Ichbiah of CII Honeywell Bull in
France under contract to the United States Department of Defense from 1977 to
1983.
• Notable features include: strong typing, packages, run-time checking, concurrency,
exception handling, and generics. Ada 95 added support for object-oriented
programming, including dynamic dispatch.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 20


WEEK 2 Evolution of Programming languages

C++
• C++ is a statically typed, multi-paradigm, compiled, general-purpose programming language.
• It is a middle-level language, as it comprises a combination of both high-level and low-level
language features.
• It was developed by Bjarne Stroustrup starting in 1979 at Bell Laboratories as an
enhancement to the C programming language following the object-oriented principles
pioneered by Simula.
• Goals:
• Augment C with the notion of classes and inheritance
• Keep the same performance as C
• Keep same applicability as C

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 21


WEEK 2 Evolution of Programming languages

• Bjarne Stroustrup describes some rules that he used for the design of C++:
• Statically typed, general-purpose language, as efficient and portable as C
• Direct and comprehensive support for multiple programming styles (procedural programming, data abstraction, object-
oriented programming, and generic programming)
• Give the programmer choice, even if this makes it possible for the programmer to choose incorrectly
• As compatible with C as possible, providing a smooth transition from C
• Avoid features that are platform specific or not general purpose
• Not incur overhead for features that are not used
• Function without a sophisticated programming environment

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 22


WEEK 2 Evolution of Programming languages

Java
• Java is a programming language originally developed by James Gosling at Sun
Microsystems and released in 1995 as a core component of Sun Microsystems' Java
platform.
• Java is a general-purpose, concurrent, class-based, and object-oriented, and is
specifically designed to have as few implementation dependencies as possible.

• It is intended to let application developers "write once, run anywhere“, meaning that
once it has been compiled, it can be executed on any platform.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 23


Programming Paradigms (Part
2)

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I


WEEK 2 Evolution of Programming languages

Introduction
• A programming paradigm is a fundamental style of computer programming.
• Compare with a software development methodology, which is a style of solving specific software
engineering problems.

• Different methodologies are more suitable for solving certain kinds of problems or applications domains.
• Programming paradigms differ in:
• the concepts and abstractions used to represent the elements of a program (such as objects, functions, variables,
constraints, etc.)
• the steps that compose a computation (assignation, evaluation, data flow, control flow, etc.).

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 25


WEEK 2 Evolution of Programming languages

• Can be understood as an abstraction of a computer system, for example the von


Neumann model used in traditional sequential computers.
• For parallel computing, there are many possible models typically reflecting different
ways processors can be interconnected to communicate and share information.
• In object-oriented programming, programmers can think of a program as a collection
of interacting objects, while in functional programming a program can be thought of
as a sequence of stateless function evaluations.
• In process-oriented programming, programmers think about applications as sets of
concurrent processes acting upon shared data structures.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 26


WEEK 2 Evolution of Programming languages

Low-level
programming paradigm
• Initially, computers were hard-wired or soft-wired and then later programmed using
binary code that represented control sequences fed to the computer CPU.

• This was difficult and error-prone. Programs written in binary are said to be written in
machine code, which is a very low-level programming paradigm. Hard-wired, soft-
wired, and binary programming are considered first generation languages.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 27


WEEK 2 Evolution of Programming languages

Procedural programming paradigm


• Often thought as a synonym for imperative programming.
• Specifying the steps the program must take to reach the desired state.
• Based upon the concept of the procedure call.
• Procedures, also known as routines, subroutines, methods, or functions that contain a
series of computational steps to be carried out.
• Using a procedural language, the programmer specifies language statements to
perform a sequence of algorithmic steps.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 28


WEEK 2 Evolution of Programming languages

Object-oriented programming paradigm


• Object-oriented programming (OOP) is a programming paradigm that uses "objects" –
data structures encapsulating data fields and procedures together with their
interactions – to design applications and computer programs.
• Associated programming techniques may include features such as data abstraction,
encapsulation, modularity, polymorphism, and inheritance.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 29


WEEK 2 Evolution of Programming languages

OOP: Variations
• There are different ways to view/implement/instantiate objects:
• Prototype-based
• objects - classes + delegation
• no classes
• objects are a set of members
• create ex nihilo or using a prototype object (“cloning”)
• Hierarchy is a "containment" based on how the objects were created using
prototyping. This hierarchy is defined using the delegation principle can be changed
as the program executes prototyping operations.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 30


WEEK 2 Evolution of Programming languages

• object-based
• objects + classes - inheritance

• classes are declared and objects are instantiated


• no inheritance is defined between classes
• No polymorphism is possible

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 31


WEEK 2 Evolution of Programming languages

• object-oriented
• objects + classes + inheritance + polymorphism

• This is recognized as true object-orientation

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 32


WEEK 2 Evolution of Programming languages

Declarative Programming paradigm


• General programming paradigm in which programs express the logic of a
computation without describing its control flow.
• Programs describe what the computation should accomplish, rather than
how it should accomplish it.
• Typically avoids the notion of variable holding state, and function side-
effects.
• Contrary to imperative programming, where a program is a series of steps
and state changes describing how the computation is achieved.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 33


WEEK 2 Evolution of Programming languages

Functional
programming paradigm
• Functional programming is a programming paradigm that treats computation as the
evaluation of mathematical functions and avoids state changes and mutable data.
• It emphasizes the application of functions, in contrast to the imperative programming
style, which emphasizes changes in state.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 34


WEEK 2 Evolution of Programming languages

1. Higher-Order Functions
2. Pure Functions
3. Recursion
4. Eager vs. Lazy Evaluation
5. Type Inference
6. In Non-functional Languages

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 35


WEEK 2 Evolution of Programming languages

Reflective
programming paradigm
• Reflection is the process by which a computer program can observe and modify its
own structure and behavior at runtime.
• In most computer architectures, program instructions are stored as data - hence the
distinction between instruction and data is merely a matter of how the information is
treated by the computer and programming language.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 36


WEEK 2 Evolution of Programming languages

Scripting
programming paradigm
• A scripting language, historically, was a language that allowed control of software
applications.

• "Scripts" are distinct from the core code of the application, as they are usually written
in a different language and are often created by the end-user.

• Scripts are most often interpreted from source code, whereas application software is
typically first compiled to a native machine code or to an intermediate code.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 37


WEEK 2 Evolution of Programming languages

Scripting Languages:
Types of Scripting Languages
1. Job control languages and shells
2. GUI scripting
3. Application-specific scripting languages
4. Web scripting languages (server-side, client-side)

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 38


WEEK 2 Evolution of Programming languages

Aspect-oriented
programming paradigm
• Aspect-oriented programming entails breaking down program logic into distinct parts
(so-called concerns or cohesive areas of functionality).

• AOP includes programming methods and tools that support the modularization of
concerns at the level of the source code, while "aspect-oriented software
development" refers to a whole engineering discipline.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 39


WEEK 2 Evolution of Programming languages

Compilation process

Weaving process

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 40


WEEK 2 Evolution of Programming languages

base code

aspect code

woven code

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 41


WEEK 2 Evolution of Programming languages

Performance Exercise 1
Create a simple program using three programming languages.

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 42


WEEK 2 Evolution of Programming languages

Assignment 2
1. Integrative Coding

IPT101 – INTEGRATIVE PROGRAMMING TECHNOLOGIES I 43

You might also like