CSE 341 Programming Languages Autumn 2002 Instructor Steve

  • Slides: 14
Download presentation
CSE 341 Programming Languages Autumn 2002 Instructor: Steve Tanimoto email: tanimoto@cs. washington. edu Teaching

CSE 341 Programming Languages Autumn 2002 Instructor: Steve Tanimoto email: tanimoto@cs. washington. edu Teaching assistants: Jed Liu -- email: jed@cs. washington. edu Eric Ott -- email: eott@cs. washington. edu Purpose: To gain a broad view of programming languages and learn fundamental concepts that relate to them. CSE 341 -- S. Tanimoto Introduction 1

Reasons to Study Programming Languages Improve our understanding of computation and problem solving; our

Reasons to Study Programming Languages Improve our understanding of computation and problem solving; our thoughts are shaped by our language (Whorfian hypothesis). Be able to choose the best language for the task. Gain facility at learning new languages. Gain access to great programming “literature”. Build an appreciation for rich programming environments and libraries. Be able to create “little languages” for specific purposes. CSE 341 -- S. Tanimoto Introduction 2

Languages and Major Topics to be Covered • • • Scheme ML Java (Prolog)

Languages and Major Topics to be Covered • • • Scheme ML Java (Prolog) Perl Functional programming “ “ with static typing Object-oriented design. Logic programming Scripting. CSE 341 -- S. Tanimoto Introduction 3

Detailed Topics with Scheme • Interactive programming • Functional programming, referential transparency, recursive functions

Detailed Topics with Scheme • Interactive programming • Functional programming, referential transparency, recursive functions • Procedures as first-class objects, closures • List processing, uniformity of programs and data • Polymorphism • Macros • Web-based interaction CSE 341 -- S. Tanimoto Introduction 4

Detailed Topics with ML • • Static types Type inference More functional programming Pattern

Detailed Topics with ML • • Static types Type inference More functional programming Pattern matching CSE 341 -- S. Tanimoto Introduction 5

Detailed Topics with Java • Object-oriented design • Inheritance, interfaces, information hiding. • Security

Detailed Topics with Java • Object-oriented design • Inheritance, interfaces, information hiding. • Security and exception handling • Portable graphics library: AWT • Support for multiple threads CSE 341 -- S. Tanimoto Introduction 6

Detailed Topics with Prolog • • Specification as programming Predicate logic Horn clauses Unification,

Detailed Topics with Prolog • • Specification as programming Predicate logic Horn clauses Unification, resolution CSE 341 -- S. Tanimoto Introduction 7

Detailed Topics with Perl • • • Scripting languages Pattern matching with regular expressions

Detailed Topics with Perl • • • Scripting languages Pattern matching with regular expressions Associative arrays. CGI programming for web-based services Integration with operating system and databases. CSE 341 -- S. Tanimoto Introduction 8

Detailed Topics in Visual Programming • History of visual programming • execution models: control

Detailed Topics in Visual Programming • History of visual programming • execution models: control flow, data flow, visual rules, direct manipulation, algorithm animation • Example systems: Agentsheets, Prograph, Stagecast Creator, Toon. Talk. • Scalability • Program visualization CSE 341 -- S. Tanimoto Introduction 9

Textbooks • Steven Tanimoto: Scheming on the Web: A Primer on Scheme and Creating

Textbooks • Steven Tanimoto: Scheming on the Web: A Primer on Scheme and Creating Intelligent Web Content. (Course notes) • Patrick Niemeyer and Jonathan Knudsen: Learning Java. • Robert Sebesta: A Little Book on Perl. CSE 341 -- S. Tanimoto Introduction 10

Evaluation • • • Assignments 1, 3, 4, 5, : Assignment 2: Group project:

Evaluation • • • Assignments 1, 3, 4, 5, : Assignment 2: Group project: Quiz 1: Quiz 2: Final exam CSE 341 -- S. Tanimoto Introduction 20% 10% 25%. 10%. 25%. 11

History of Programming Languages • • • FORTRAN ALGOL 60 COBOL APL LISP SNOBOL

History of Programming Languages • • • FORTRAN ALGOL 60 COBOL APL LISP SNOBOL 4 PL/1 BASIC PASCAL 1954 -57 1958 -60 1959 -60 1956 -62 1962 -66 1963 -64 1971 numeric business vector/matrix math symbols strings general educational CSE 341 -- S. Tanimoto Introduction 12

History of Prog. Languages (continued) • • • PROLOG C Scheme Ada Smalltalk C++

History of Prog. Languages (continued) • • • PROLOG C Scheme Ada Smalltalk C++ CLOS Perl Java 1972 1975 1979 1971 -80 1982 -86 1983 -84 1989 1991 AI/logic with rules general educational general applications/objects general/objects LISP/objects scripting applets, general/objects CSE 341 -- S. Tanimoto Introduction 13

Orthogonality • Every combination of two constructs of a language is meaningful. • The

Orthogonality • Every combination of two constructs of a language is meaningful. • The meaning of a construct does not depend on its context. • Pro: Makes learning a language easier, since there tend to be fewer constructs and there are fewer special cases. • Con: Because every combination of constructs must be allowed, nonsensical combinations will compile without error. arithmetic expressions arguments to functions CSE 341 -- S. Tanimoto Introduction 14