0% found this document useful (0 votes)
26 views14 pages

Lect One

This document provides an overview of programming languages including definitions of programs and programming languages, reasons for studying programming languages, a brief history of programming languages from 1950 to the 1990s including FORTRAN, COBOL, LISP, ALGOL, Ada, C, Pascal, Smalltalk, and more recent languages, differences between low-level and high-level languages, programming styles like procedural and object-oriented, attributes of good languages, issues for all languages, and translation methods like compilation and interpretation.

Uploaded by

LAURENT JIBUNGE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views14 pages

Lect One

This document provides an overview of programming languages including definitions of programs and programming languages, reasons for studying programming languages, a brief history of programming languages from 1950 to the 1990s including FORTRAN, COBOL, LISP, ALGOL, Ada, C, Pascal, Smalltalk, and more recent languages, differences between low-level and high-level languages, programming styles like procedural and object-oriented, attributes of good languages, issues for all languages, and translation methods like compilation and interpretation.

Uploaded by

LAURENT JIBUNGE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 14

CP 111: PRINCIPLES OF

PROGRAMMING

An overview of programming
languages

1
What are Program and
programming language?
• Program : Set of instructions which a
computer can “interpret” to solve
problems, make calculations, perform
tasks, etc.

• Programming Language : A formal


language that is intended for the
expression of computer programs

2
Why study programming
languages?
• Programming languages are important for
students in all disciplines of engineering because
they are the primary tools of the central
activity of any science.

3
Why study programming
languages? (cont.)
• To improve your ability to develop effective
algorithms and to improve your use of your
existing programming language.
• To increase your vocabulary of useful
programming constructs.
• To allow a better choice of programming
languages.
• To make it easier to learn a new language.

4
A short history of programming
Languages
1950 : Numerically based languages. FORTRAN
–Business languages. COBOL
–Artificial intelligence languages. LISP, ALGOL
• 1970 : PLs Ada, C, Pascal, Smalltalk
• 1980 : Development of functional programming: ML,
Object-oriented programming: Smalltalk, C++

5
A short history of programming
languages (cont.)
• 90s:
– Fourth-generation languages
– Productivity tools (such as spreadsheets)
– Visual languages : Delphi
– Scripting languages : Perl
– Expert systems shells
– Network computing : Java

6
Low-level vs. High-level
Programming Languages
• Low-level:
– Machine code
– Assembly
• High-level: (abstraction from the computer
details)
– Basic, C, Java, Pascal, C++, Perl, Python, …

7
Styles of Computer Programming
• Procedural: procedures, routines, subroutines, methods,
or functions
– e.g. C, Pascal, Basic, Fortran
• Object-oriented
– e.g. C++, Java, Smalltalk

8
Attributes of a good language
• Ease of program verification
– Proof of correctness, desk checking, test
– Simplicity of semantic and syntax
• Programming environment
• Portability of programs
• Cost of use
– Program execution
– Program translation
– Program creation, testing, and use
– Program maintenance
9
Attributes of a good language
(another view: to make a software reliable,
maintainable, efficient)
• Reliability
– Writability
– Readability
– Simplicity
– Safety (no goto, no pointers)
– Robustness (undesired events can be trapped, like
arithmetic overflow, invalid inputs)
• Maintainability
– Factoring (modularity)
– Locality
• Efficiency 10
Issues for all Languages
• Can it be understood by people and
processed by machines?
– although translation may be required
• Sufficient expressive power?
– can we say what needs to be said, at an
appropriate level of abstraction?

11
Translation
• Compilation
– Translate into instructions suitable for some
other (lower level) machine
– During execution, that machine maintains
program state information
• Interpretation
– May involve some translation
– Interpreter maintains program state
12
Trade-offs
• Compilation
– lower level machine may be faster, so programs
run faster
– compilation can be expensive
– examples: C (and Java?)
• Interpretation
– more ability to perform diagnostics (or
changes) at run-time

13
END

14

You might also like