01 Handout 1 Flashcards
It is used for communicating instructions to a computer. It is designed to facilitate certain operations such as numerical computation, text manipulation, or input/output.
Programming Language
Reasons for Studying Concepts of Programming Languages
- Increased capacity to express ideas
- Improved background for choosing appropriate language
- Increased ability to learn new languages.
- Better understanding of the significance of implementation.
- Better use of languages that are already known.
- Overall advancement of computing.
Programming Domains
Scientific Applications
Business Applications
Artificial Intelligence
Systems Programming
Web Software
Language Evaluation Criteria
- Readability – the ease with which programs can be read or understood
- Writability – how easily a language can be used to create programs
- Reliability – if a program performs to its specifications under all conditions
- Cost
the ease with which programs can be read or understood
Readability
how easily a language can be used to create programs
Writability
if a program performs to its specifications under all conditions
Reliability
Characteristics that Affect Readability
- Overall Simplicity: A language with a large number of basic constructs is more difficult to learn than
one with a smaller number. - Orthogonality – means that a relatively small set of primitive constructs can be combined in a
relatively small number of ways to build the control and data structures of the language - Data Types
- Syntax Design
o Special Words
o Form and Meaning
Characteristics that Affect Writability
- Simplicity and Orthogonality
- Support for Abstraction: Abstraction is the ability to define and then use complicated structures or
operations in ways that allow many of the details to be ignored.
o Process (Ex. The use of a subprogram to implement a sort algorithm that is required several
times in a program
o Data (Ex. A binary tree that stores integer data in its nodes can be implemented using an
abstraction of a tree node in the form of a simple class with two pointers and an integer - Expressivity – means that a language has relatively convenient ways of specifying computation.
Characteristics that Affect Reliability
- Type Checking – testing for type errors in a given program, either by the compiler or during program
execution - Exception Handling – the ability of a program to intercept run-time errors (as well as other unusual
- conditions detectable by the program), take corrective measures, and then continue
- Aliasing – having two or more distinct names that can be used to access the same memory cell
- Readability and Writability
Most of the popular languages of the past 50 years have been designed around the prevalent
computer architecture, called the von Neumann architecture, after one of its originators, John von
Neumann (pronounced “von Noyman”). These languages are called …
Imperative Languages
The evolutionary steps in software development methodologies
led to new language constructs to support them. The most familiar design methodologies are procedural and object-oriented programming.
Programming Design Methodologies
Language Categories
- Imperative Language
- Functional Language
- Logic language
- Object-Oriented Language
- Based on commands that update variables in storage
- Provides statements such as assignment statements, which explicitly change the state of the memory
of the computer
Imperative Language
Examples of Imperative Language
Algol, Cobol, PL1, Ada, C, Modula-3
- Expresses computations as the evaluation of mathematical functions
- Treats values as single entities
- Values are never modified.
- Their computations are performed largely by applying functions to values.
Functional Language
- Expresses computations in exclusively in terms of mathematical logic
- Focuses on predicate logic, on which the basic concept is a relation
- Useful for expressing problems where it is not obvious what the functions should be
Logic Language
o Everything is modeled as an object.
o Computation is performed by message passing.
o Objects communicate with one another via message passing.
o Every object is an instance of a class where the class represents a group of similar objects.
o Inheritance defines the relationships between classes.
Object-Oriented Language
What are the three implementation methods?
- Compilation
- Pure Interpretation
- Hybrid Implementation Systems
programs are translated into machine language
Compilation
programs are interpreted by another program called interpreter, without translation
Pure Interpretation
the combination of compilation and interpretation
Hybrid Implementation Systems
A collection of tools used in software development
Programming Environment
May consist of a file system, a text editor, a linker, and a compiler
Programming Environment
May also include a large collection of integrated tools
Programming Environment
Its examples are UNIX, JBuilder, Microsoft Visual Studio .NET, NetBeans
Programming Environment
Everything is modeled as an object
Object-Oriented Language
Computation is performed by …
message passing
Objects communicate with one another via ….
message passing
Treats values as single entities
Functional Language
Values are never modified
Functional Language
Examples are: Algol, Cobol, PL1, Ada, C, Modula-3
Imperative Language
Examples are: Lisp, Haskell, ML, Miranda, APL
Functional Language
Example is: Prolog
Logic Language
Examples are: Smalltalk,Simula, C++, Java
Object-Oriented Language
It defines the relationship between classes
Inheritance