engr. isabelo jun d. paat, me-coe lecturer 1 programming languages

16
Engr. Isabelo Jun D. Paat, ME-CoE Lecturer 1 Programming Languages

Upload: phebe-conley

Post on 17-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Engr. Isabelo Jun D. Paat, ME-CoE Lecturer 1 Programming Languages

Engr. Isabelo Jun D. Paat, ME-CoE

Lecturer1

Programming Languages

Page 2: Engr. Isabelo Jun D. Paat, ME-CoE Lecturer 1 Programming Languages

References:

2

Principles of Programming Languages, Bruce J. MacLennan 

Programming Languages Concepts and Constructs,Ravi Sethi 

Programming Languages Design and Implementation,Terrence Pratt, Marvin Zelkowitz

Programming Languages Concepts,Carlo Ghezzi, Mehdi Jazayeri

Concepts in Programming Languages, John C. Mitchel

Page 3: Engr. Isabelo Jun D. Paat, ME-CoE Lecturer 1 Programming Languages

Grading

3

MidTerm 30% Final 40% Quiz 10% Programming Project 15% Attendance 5%-----------------------------------------------

100%

Final less than 50% -> You fail the course

Page 4: Engr. Isabelo Jun D. Paat, ME-CoE Lecturer 1 Programming Languages

4

Class CollaborationAttendanceContributing in the class discussions, if anyBe active, but not too much

Page 5: Engr. Isabelo Jun D. Paat, ME-CoE Lecturer 1 Programming Languages

The Study of Programming Languages

5

The purpose of language is simply that it must convey meaning. (Confucius)

That which can be said, can be said clearly. (Wittgenstein,1963)

A program is a specification of a computation. A programming language is a notation for writing programs.(Sethi,89)

Page 6: Engr. Isabelo Jun D. Paat, ME-CoE Lecturer 1 Programming Languages

What is a programming language?

6

A language that is intended for the expression of computer programs and that is capable of expressing any computer program.

Page 7: Engr. Isabelo Jun D. Paat, ME-CoE Lecturer 1 Programming Languages

How are programming languages different?

7

According to our definition they are all theoretically equally powerful.

But not equally easy to use!

Theoretical power <> Practical power

Page 8: Engr. Isabelo Jun D. Paat, ME-CoE Lecturer 1 Programming Languages

Why study programming languages?

8

Programming languages are important for students in all disciplines of computer science because they are the primary tools of the central activity of computer science : programming.

There is an idea: the structure of language defines the boundaries of thought.

Page 9: Engr. Isabelo Jun D. Paat, ME-CoE Lecturer 1 Programming Languages

Why study programming languages? (cont.)

9

To improve your ability to develop effective algorithms and to improve your use of your existing programming language.O-O features, recursionCall by value, call by reference

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.To make it easier to design a new language.

Page 10: Engr. Isabelo Jun D. Paat, ME-CoE Lecturer 1 Programming Languages

A short history of programming Languages

10

1950 : LISP, FORTRAN1970 : Ada, C, Pascal, Prolog, Smalltalk1980 : C++, ML

During 1970 : a lot of PLs were designed.Early languages:

Numerically based languages. (FORTRAN:55,ALGOL:58)

Business languages. (COBOL:60)Artificial intelligence languages. (LISP,Prolog)Systems languages. ( C:70)

Page 11: Engr. Isabelo Jun D. Paat, ME-CoE Lecturer 1 Programming Languages

A short history of programming languages (cont.)

11

50s and 60s :Early high level languages : FORTRAN, COBOL,

ALGOL60Early mathematical based languages : LISP, APL,

SNOBOLGeneral-purpose language : PL/1Next leap forward: Algol68, SIMULA67, BASIC

70s:High level and structured programming: PascalSystems programming: C, modula-2Logical programming: PrologImprovement of functional programming:

Scheme

Page 12: Engr. Isabelo Jun D. Paat, ME-CoE Lecturer 1 Programming Languages

A short history of programming languages (cont.)

12

80s:Development of functional programming: ML,

MirandaNeed for reliability and maintainability: AdaObject-oriented programming: Smalltalk, C++

90s:Fourth-generation languagesProductivity tools (such as spreadsheets)Visual languages : DelphiScripting languages : PerlExpert systems shellsNetwork computing : Java

Page 13: Engr. Isabelo Jun D. Paat, ME-CoE Lecturer 1 Programming Languages

Influences on programming languages

13

Computer capabilitiesHardware and OS

ApplicationsWide area of applications

Programming methodsMultiprogramming, interactive systems, data

abstraction, formal semantics,O-O programming,…

Implementation methods Theoretical studiesStandardization

Page 14: Engr. Isabelo Jun D. Paat, ME-CoE Lecturer 1 Programming Languages

Attributes of a good language

14

Clarity, simplicity, and unityHave a minimum number of different

concepts, with the rules for their combination, simple and regular (conceptual integrity).

readabilityOrthogonality

Being able to combine various features of a language in all possible combinations.

Naturalness for the applicationSupport for abstraction

Page 15: Engr. Isabelo Jun D. Paat, ME-CoE Lecturer 1 Programming Languages

Attributes of a good language

15

Ease of program verificationProof of correctness, desk checking, testSimplicity of semantic and syntax

Programming environmentPortability of programsCost of use

Program executionProgram translationProgram creation, testing, and useProgram maintenance

Page 16: Engr. Isabelo Jun D. Paat, ME-CoE Lecturer 1 Programming Languages

Attributes of a good language (another view: to make a software reliable, maintainable, efficient)

Jazayeri16

ReliabilityWritabilityReadabilitySimplicitySafety (no goto, no pointers)Robustness (undesired events can be

trapped, like arithmetic overflow, invalid inputs)

MaintainabilityFactoring (modularity)Locality

Efficiency