CS 342 Lecture -*- Outline -*- * COURSE REVIEW ** Design *** Principles? **** expressiveness (abstraction, automation, inf. hiding, allowing expression of security, structure or readability, meta-linguistic abstraction) **** efficiency (programming time, compile-time, run-time, object file size, run-time space, localized costs, portability) **** aesthetics (simplicity, syntactic consistency, orthogonality, regularity, zero-one-infinity, terseness or syntactic abstraction) **** others? *** Features vs. principles What principles can apply to what features? e.g.: name binding (scope) type checking abstraction facilities calling conventions For each principle, name a feature or features that allow the principle to be embodied in *programs* ** What features are important? *** Some are virtually language independent **** naming: scopes, mutation of bindings, ... **** abstraction mechanisms: procedural, data, control (both declaration and use: parameterization) **** expressing security constraints: declarations, types *** Some depend on goals of particular system What kinds of goals? **** Application area: scientific processing => algebraic notation symbolic list processing => lists, symbols, recursion O.S. interface => commands, notion of state, ... **** Intended users: novice programmer, expert, biologist, ... **** Support programming method or design strategy: top-down design => nesting of modules data abstraction => information hiding, name type checking table-driven designs => first-class functions, or dynamic binding (messages) meta-linguistic abstraction => programs as data **** Paradigm support: object-oriented => dynamic binding, inheritance functional => first-class functions, full closures logic => logical variables, unification, resolution ** Language Paradigms (frameworks) What are the various language frameworks? imperative, applicative, functional, OOP, Logic What framework do you prefer and why? for simulation? for database work? for numerical/scientific programming? Which language paradigm has the most potential for (eventually): putting programmers out of work? solving problems quickly? leading to code reuse? helping programmers write correct code? rapid prototyping? Which paradigm is the most expressive? Which paradigm is the most efficient in programmer time? at run-time? (on what kind of hardware) Which paradigm is the most aesthetically pleasing? ** Run-time data structures and algorithms (these are data abstractions, naturally) Make a list of the run-time data structures: various built-in types (e.g., arrays, lists, records, variants, pointers) environments closures heap garbage collection, reference counting vs. explicit deallocation ** Historical innovation (skip this) What principles were first illustrated by Gen. Language(s) 0. Pseudo Code Interpreters 1. Fortran (1957) 1 or 5. LISP (1958-60) 2. Algol (1960) and Algol 58 3. Pascal (1971) 3. C (1972) 4. CLU (1975), Ada (1979-83) 5 or 1. Prolog (1972) 5. Smalltalk (1972-80) and Simula 67 What features/implementation techniques were introduced? What are common characteristics of the generations What problems were introduced? What problems of earlier languages were solved? ** Research directions: *** New paradigms (hard): constraint programming *** New applications: using language design ideas for a specific area (non-general purpose languages) *** Improving expression, efficiency, aesthetics, etc. Parallelism (efficient use of hdw., motivates major paradigms) Type checking (security) Semantics (defining/describing languages) helps evaluate simplicity/regularity of language models motivate languages and features Abstraction mechanisms (data abstraction, inheritance, control)