CS 541 Lecture -*- Outline -*- * course summary ** review of syllabus ------------------------------------------ WHAT WE STUDIED Object-Oriented Languages Smalltalk, Java Aspect-Oriented Languages AspectJ, Aspect Smalltalk Functional Programming Languages Haskell ------------------------------------------ in previous years: Approaches to Making Programming Easier Object-Oriented Programming and Frameworks Smalltalk Functional Programming and DSLs Haskell Logic Programming and search lambda Prolog ** Programming lessons Q: What did you learn about programming from each? ------------------------------------------ WHAT DID WE LEARN ABOUT EACH PARADIGM? ------------------------------------------ *** OO (Smalltalk, C++, Java): the utility of data abstraction information hiding (keep rep details in their place) think about types the power of subtype polymorphism (message passing and subclasses) want to define a general vocabulary for organizing ADTs convenience of inheritance for making changes without editing allow for change *** Aspect-Oriented (AspectJ): Separation of concerns, Cross-cutting concerns Tangling aspects development vs. production aspects (spectators vs. assistants) obliviousness (ability to change a program without editing it) What AspectJ can do joinpoints, point cut declarations, kinds of advice, cflow ways to combine advice introductions (methods, fields, subtypings) Semantics Control of code (what compiler sees) How code is weaved Research issues (modularity, privacy, abstraction, ...) *** Functional (Haskell, SML, Scheme): how to write recursive functions base, inductive case make program structure match structure of data power of functional abstraction: never write the same thing twice functions as data lazy evaluation monads for encapsulating side effects *** Logic (\Prolog, Prolog): run-time efficiency isn't the only thing want to write programs efficiently too constructive definitions can be turned into programs backtracking unification can represent data by terms *** Comparison Q: What are the advantages and disadvantages (limits) of each paradigm? (see also the styles-vs-problems.txt file) Q: How do they compare for making programming easier? research question: Can we combine the advantages somehow? ** language design ideas ------------------------------------------ WHAT DID WE LEARN ABOUT LANGUAGE DESIGN? ------------------------------------------ Q: What techniques? grammatical-based explanation and semantics lazy evaluation and blocks Q: What principles? regularity, uniformity ** what's the value of all this? ------------------------------------------ WHAT'S THE VALUE OF ALL THIS? Programming is language design: - make it easy for your users - give them good notation - provide primitives, ways to combine them, and abstraction facilities Prototyping language designs: - through lazy functional languages - through frameworks - through logic ------------------------------------------ ** where to go from here ------------------------------------------ WHERE TO GO FROM HERE Further classes: - 540 Compilers - 641 (Semantic models for Prog. Langs.) - Seminar on PL design ------------------------------------------