Programming Language Concepts 1982, 1987, Outline. Period

Similar documents
Topic I. Introduction and motivation References: Chapter 1 of Concepts in programming languages by J. C. Mitchell. CUP, 2003.

Concepts in Programming Languages

Programmiersprachen (Programming Languages)

Languages october 22, 2017 Éric Lévénez < FORTRAN III end-1958 FORTRAN II FORTRAN I october 1956

Lecture 09. Ada to Software Engineering. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

General Concepts. Abstraction Computational Paradigms Implementation Application Domains Influence on Success Influences on Design

PLAGIARISM. Administrivia. Course home page: Introduction to Programming Languages and Compilers

Introduction to Programming Languages and Compilers. CS164 11:00-12:00 MWF 306 Soda

Continuations provide a novel way to suspend and reexecute

Language Translation, History. CS152. Chris Pollett. Sep. 3, 2008.

Logic Programming II & Revision

Introduction. A. Bellaachia Page: 1

Com S 541. Programming Languages I

8/27/17. CS-3304 Introduction. What will you learn? Semester Outline. Websites INTRODUCTION TO PROGRAMMING LANGUAGES

Low-Level Languages. Computer Programs and Programming Languages

Lecture 1: Course Introduction

Programming Languages 1. Introduction. Oscar Nierstrasz

Principles in Programming: Orientation & Lecture 1. SWE2004: Principles in Programming Spring 2014 Euiseong Seo

Chapter 2 Preview. Preview. History of Programming Languages. History of Programming Languages. History of Programming Languages

Programming Paradigms

CSc 372 Comparative Programming Languages

COSC 2P90 Programming Languages & Object-Orientation

CSC 326H1F, Fall Programming Languages. What languages do you know? Instructor: Ali Juma. A survey of counted loops: FORTRAN

CS 565: Programming Languages. Spring 2008 Tu, Th: 16:30-17:45 Room LWSN 1106

Organization of Programming Languages (CSE452) Why are there so many programming languages? What makes a language successful?

Compilation 2012 The What and Why of Compilers

Programming Languages, Summary CSC419; Odelia Schwartz

CS2303 C14 Systems Programming Concepts. Bob Kinicki

Thanks! Review. Course Goals. General Themes in this Course. There are many programming languages. Teaching Assistants. John Mitchell.

Outline. Introduction to Programming (in C++) Introduction. First program in C++ Programming examples

CSCI 3136 Principles of Programming Languages

Principles of Programming Languages. Lecture Outline

Chapter 2. Pseudocodes: Speedcoding. 2.2 Minimal Hardware Programming: Pseudocodes. Evolution of the Major Programming Languages

Lecture 1: Course Introduction

Object Oriented Paradigm

Chapter 5 Names, Binding, Type Checking and Scopes

Why study Programming Language Concepts? Chapter One. Language Evaluation Criteria. Programming Domains. Readability Writability Reliability Cost

CSc 520. Course Outline (Subject to change) Course Outline (Subject to change)... Principles of Programming Languages. Christian Collberg

Discovering Computers 2008

Programming Languages 2nd edition Tucker and Noonan"

Design & Implementation Overview

Imperative Programming

What is a programming language?

Seminar in Programming Languages

Introduction to Computer Science I

COMP 201: Principles of Programming

What Is Computer Science? The Scientific Study of Computation. Expressing or Describing

Concepts of Programming Languages

CSE 307: Principles of Programming Languages

Simply-Typed Lambda Calculus

Question No: 1 ( Marks: 1 ) - Please choose one One difference LISP and PROLOG is. AI Puzzle Game All f the given

CMPUT Language Paradigms. Programming Paradigms. Dr. B. Price & Dr. R. Greiner. 7th September Real languages draw upon multiple paradigms

Final-Term Papers Solved MCQS with Reference

Principles in Programming: Orientation & Lecture 1. SWE2004: Principles in Programming Spring 2015 Euiseong Seo

2. Evolution of the Major Programming languages

Why are there so many programming languages? Why do we have programming languages? What is a language for? What makes a language successful?

Course outline. CSE 341: Programming Languages. Why study programming languages? Course motivation and objectives. 1 lecture: Concepts

HANDLING NONLOCAL REFERENCES

Chapter 2. 5 * B => A V 6 7 (subscripts) S 1.n 1.n (data types)

Lecture 13: Expression Evaluation

Introduction to Engineering Using Robotics Experiments. Dr. Yinong Chen

Chapter 1. Preliminaries

Chapter 10 :: Data Abstraction and Object Orientation

Chapter 2. Chapter 2

! Broaden your language horizons! Different programming languages! Different language features and tradeoffs. ! Study how languages are implemented

Concepts of Object-Oriented Programming Peter Müller

Announcements Tues., Aug and 2. to call them ( ) ! For next time, read Learning Computing with Robots, chs.

Comp 333: Concepts of Programming Languages Fall 2016

CS A331 Programming Language Concepts

Introduction to Operating Systems. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Lecturer: William W.Y. Hsu. Programming Languages

Informal Semantics of Data. semantic specification names (identifiers) attributes binding declarations scope rules visibility

Fundamentals of Programming Languages. PL families Lecture 02 sl. dr. ing. Ciprian-Bogdan Chirila

CS 3304 Comparative Languages. Lecture 1: Introduction

! Broaden your language horizons. ! Study how languages are implemented. ! Study how languages are described / specified

1. Software Systems Complexity, OO Paradigm, UML

Objective: To learn meaning and concepts of programming. Outcome: By the end of this students should be able to describe the meaning of programming

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG)

Programming Languages (CS )

CSCI.4430/6969 Programming Languages Lecture Notes

Welcome to Introduction to Computer Science I

Types. What is a type?

DATA TYPES. CS 403: Types and Classes DATA TYPES (CONT D)

Tales from the Workshops

Software II: Principles of Programming Languages. Why Expressions?

Early computers (1940s) cost millions of dollars and were programmed in machine language. less error-prone method needed

MIDTERM EXAMINATION - CS130 - Spring 2005

ECE 2400 / ENGRD 2140 Computer Systems Programming Course Overview

Programming Language Concepts

Programming Languages CMSC 4023 Chapter 2

CS508-Modern Programming Solved MCQ(S) From Midterm Papers (1 TO 22 Lectures) BY Arslan

Chapter 9 :: Data Abstraction and Object Orientation

Introduction to Operating Systems. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Informatica 3 Syntax and Semantics

INSTITUTE OF AERONAUTICAL ENGINEERING

Programming Languages (CS )

Lecture 15: Iteration and Recursion

Introduction to Operating Systems

Spring 2003 Instructor: Dr. Shahadat Hossain. Administrative Matters Course Information Introduction to Programming Techniques

LECTURE 1. Overview and History

Transcription:

Programming Language Concepts 1982, 1987, 1997 Mehdi Jazayeri Distributed Systems Group Technische Universität Wien mjazayeri@alum.mit.edu http://www.infosys.tuwien.ac.at Outline Computer science environment before each edition Languages covered in each edition and why Principles in each edition Structure of each edition Today s questions: C++, Java, C#,? Comments and conclusions PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 2 Period 1975-1980 IBM mainframes PL/I Algol 60, Pascal PDP-10 and LISP MJ at the University of North Carolina, Chapel Hill CG came to visit in 1978-79 PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 3

Environment before first edition (1980) Excitement about functional programming Excitement and apprehension about Ada C versus Pascal debates Unix and available computing (moving away from mainframes) Surprise: PROLOG PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 4 Environment before second edition (1985) Japanese Fifth Generation Project Logic programming PROLOG Acceptance of multiple paradigms Lowered expectation of formal methods formal semantics Widespread unix Surprise: C++ PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 5 Environment before third edition (1997) Dominance of object orientation C++, Ada 95 More functional programming ML Excitement about Internet Java, Java, Java, Java, Java, PCs, WWW, language implementations Surprise:? PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 6

Today s environment Domination of marketing Short term focus (time-to-market)... PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 7 Choice of languages First Edition Pascal beauty and simplicity teaching value Algol 68 blind adherence to language design principles Simula 67 fundamental support for abstraction through the class concept But not Ada -- why not? PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 8 Glossary of selected languages First Edition Ada ALGOL 60 ALGOL 68 APL Bliss C CLU Concurrent Pascal COBOL Euclid FORTRAN Gypsy LISP Mesa Modula Pascal PL/I PLZ SIMULA 67 SNOBOL4 PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 9

Glossary of selected languages Second Edition Ada ALGOL 60 ALGOL 68 APL BASIC (added) Bliss C CLU COBOL Concurrent Pascal Euclid FORTRAN Gypsy LISP Mesa Modula-2 (repl. Modula) Pascal PL/I PROLOG ( repl. PLZ) SIMULA 67 Smalltalk SNOBOL4 PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 10 Glossary of selected languages Third Edition Ada ALGOL 60 ALGOL 68 APL BASIC C C++ CLIPS CLOS CLU COBOL Concurrent Pascal Eiffel Euclid FORTRAN Icon Java LISP Mesa ML Modula-2 Modula-3 Oberon-2 OPS5 Pascal Perl PL/I PROLOG Python Scheme SETL SIMULA 67 Smalltalk SNOBOL4 Tcl/Tk indicates addition removed: Bliss, Gypsy PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 11 Glossary of selected languages additions in Third Edition C++ CLIPS CLOS Eiffel Icon Java ML Modula-3 Oberon-2 OPS5 Perl Python Scheme SETL Tcl/Tk indicates addition removed: Bliss, Gypsy PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 12

Third Edition What added languages reflect C++ CLIPS CLOS Eiffel Icon Java ML Modula-3 Oberon-2 OPS5 Perl Python Scheme SETL Tcl/Tk indicates addition removed: Bliss, Gypsy PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 13 Third Edition Classification of added languages Object Orientation C++, Eiffel, Modula-3, Oberon-2 Internet Java, Perl, Python, Tcl/Tk GUI Tcl/Tk, Java Paradigms CLOS, ML, Scheme CLIPS, OPS5 Scripting Perl, Python, Tcl/Tk Others SETL Icon removed: Bliss, Gypsy PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 14 Structure of first edition Based on software engineering goals imposed on languages Data abstraction Control abstraction Program correctness Programming in the large PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 15

Structure of second edition Based on software engineering goals imposed on languages but more emphasis on language mechanisms Data types Control structures Programming in the large PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 16 Structure of third edition Based on structure and structuring Structuring the data Structuring the computation Structuring the program PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 17 Java: a good fit An object-oriented network-centric programming language Provides type-safety concurrency modularity Excellent example of applying language design principles Finally...an American language :)! PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 18

Java: not a perfect fit Big language Pure object orientation Inner classes Lack of genericity too much hype... PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 19 My wish for a Java feature: templates Generic (polymorphic) components allow the raising of level of abstraction queue (T) sort (queue (T)) They lead to a cleaner language They lead to cleaner programs avoid the casting to Object e.g. hashtable(key, value) uniformity of primitive and nonprimitive types Java talk Mehdi Jazayeri, TU Wien 20 Lack of templates forces reliance on type casting A generally useful collection class such as Vector or Hashtable should be written to accept any kind of object: integer, employee, etc. In Java, they are therefore written to hold Object Java talk Mehdi Jazayeri, TU Wien 21

Vector class Some methods of Vector: public void addelement(object) public Object firstelement() pubic int capacity() public int size() What if we want to insert a Point p into vector v? Java talk Mehdi Jazayeri, TU Wien 22 Need for casts with Vector To insert Point p in Vector v: v.addelement (p); What about getting an element out? p = v.firstelement(); XXX No! XXX We must use a cast: p = (Point) v.firstelement(); Java talk Mehdi Jazayeri, TU Wien 23 More problems: What if the vector may contain objects of different types: Points, Pixels, Boxes? Need runtime checks: Object o = v.firstelement(); if (o instanceof Point) { // code to process Point object } if (o instanceof Pixel) {... Java talk Mehdi Jazayeri, TU Wien 24

Object wrappers What if we want to insert int objects into Vector? Problem: primitive types are not derived from Object! Wrappers make objects out of primitive types: v.addelement (new Integer(i)); Integer i = (Integer) v.firstelement(); int in = ((Integer) v.firstelement()).intvalue(); C# does the conversions implicitly Java talk Mehdi Jazayeri, TU Wien 25 Templates versus inheritance In C++, templates are used to write generic collection classes such as Vector and Hashtable Such generic collections can accept any type of object, including primitive types There is no need for casting or wrappers Required runtime checks in Java make the code ugly and inefficient Java talk Mehdi Jazayeri, TU Wien 26 Principles 1st edition concepts -- to support sw engineering languages: Pascal, Simula 67, Algol 68 Unix functional programming -- Backus FP Use of simplesem operational semantics list of languages PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 27

Principles 2nd edition paradigms -- more on functional but logic and rule-based also Fifth Generation formal semantics list of languages PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 28 Principles 3rd edition concepts -- structure structuring the data structuring the computation structuring the program languages: C++, ML, Java, Ada 95 paradigms: OO list of languages PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 29 New possibilities Third edition Web site http://www.infosys.tuwien.ac.at/pl-book Simplesem interpreter in Java first edition: concepts second edition: more rigorous third edition: supported by interpreter PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 30

Anticipating language developments Inside view linguistic details such as control and data structure drives some (research) languages Outside view how is the language used? PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 31 External view External view determines development of languages Context of use execution development Successful languages take the external view into account PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 32 External view Execution context user-interfaces» multimedia devices computational model» Internet» middleware database integration dealing with time PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 33

External view Development context Visual interfaces Visual languages Programming by assembly (software components) PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 34 Concluding questions Do we know what language will emerge and dominate in the future? What are the factors that determine the success of a language, i.e. adoption by a large user community? Will there be one dominant language? Should a programming language concepts course be required in computer science? PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 35 Final word The study of programming languages is fun and exciting. The fun and excitement will continue Will Java kill C++, Smalltalk, and Eiffel? Will C# kill Java? Will there be a C* that will replace all else? PL Concepts, Jan. 2001 Mehdi Jazayeri/TU Wien/Univ. Lugano 36