Lecture 02 Flashcards
Algol
Algol (ALGOrithmic Language),
designed to overcome
the problems of FORTRAN in the late 50s
Algol 60 Major Concepts
- use of formal notation for syntax (BNF notation - lecture 5);
– block structure (with locally-defined variables);
– recursive procedures; and
– “readable” if and for statements.
Pascal
It is a direct descendant of Algol, intended to be more
efficient in order to compete with Fortran as a general purpose language.
Pascal compiler was designed to be portable, by compiling to a virtual machine (the p-code
system).
Pascal became popular in the late 70s as a teaching
language in universities
More recent versions of Pascal have added modules and classes (e.g., the Object Pascal language, also called
Delphi)
Pascal continued
The program statement is a required first line of every program.
Program must have a name.
- input means that the keyboard may be used to put information into the program.
– output means that the program may write information to the video display.
program must have a “begin” to mark, likewise with an “end” statement too.
C
Fortran and COBOL proved successful in the 60s.
C was developed in 1972, alongside UNIX OS at Bell Labs.
C has high-level features like functions, loops and has low-level operations like arithmetic on memory addresses.
Object Oriented Language
Major application of computers is simulation of real-world systems.
Early programming languages developed for simulation include GPSS (1961) and Simula 1 (1965).
Designers of Simula, Dahl, Nygaard added the concept of the “class” to represent simulated entitites.
Simula 67 is considered as orginial object oreintated language.
Influential object-orientated languages that followed Simula 67 include Smalltalk (1980) and Eiffel (1986).
Scripting Languages
They are used to write programs that run for a special run-time environment that automate execution of tasks, or alternatively be executed by one-by-one by a human operator. For example shell scripts (CLI).
Scripting Languages Examples
High Level languages such as Perl, Python, Ruby, PHP, JavaScript, and MatLab.
Scripting languages have a simple syntax and semantics, interpreted and intended to be very fast to learn and write in.
Logical Languages: Prolog
ProLog building blocks are variables, constants, and structures.
Variables begin with capital letter.
Constants are either atoms like words or integers.
Structures consist of functor and arguments.
Prolog Queries
Used to answer queries ( arithmetic operations possible)
Query is a fact or rule that initiates a search for success in Prolog program.
Language Evaluation Criteria
Simplicity
Lexical elements.
Orthogonality
Control Structures
Data Types
Expressiveness
Type Checking
Exception Handling.
Simplicity
Language with simple syntax and small number of constructs. Smalltalk is considered simple vs C++ which is complex/large.
Programmers tend to learn only a subset of large language.
An example is i++, i = i + 1 in C++ and Java.