I. goals and process for designing a language ("Simple") A. goals --------------------------------------------------------- GOALS simplicity: especially ease parsing the input and of implementation ==> regularity generality: since it aids simplicity ability to manipulate programs as data: to ease construction of interpreters and compilers to allow "meta programming" --------------------------------------------------------- B. process C. parts of a language --------------------------------------------------------- PARTS OF A LANGUAGE means of computiation = primitive expressions (data) means of combination means of abstraction --------------------------------------------------------- II. data or means of computation A. plan 1. brainstorming What should be the types in the language? How do we know whether we have enough types? 2. condensation How does simplicity affect the list of types? ------------------------------------------ SIMULATION, GENERALITY def: A type T can simulate a type U if using T one can get the same behavior as U. Behavior includes: functionality (inputs, outputs) size (space used) time (complexity of running ops) ------------------------------------------ How do we know whether we have too many types? What types should be built-in? 3. type checking Should there be a static type system, or should there be run-time type checking? ------------------------------------------ TYPE CHECKING AND TYPE ERRORS term: type error def: *dynamic type checking* means type errors are detected (in general) def: *static type checking* means type errors are detected ------------------------------------------ Which is better for users? Which is more flexible? Which suits interpreters better? Which gives better performance? 4. summary B. operations What literals, constructors, and observers are needed? Are any special forms (e.g., &&, || in Java) needed? C. terminology --------------------------------------------------------- TERMINOLOGY special form closure (as in algebraic closure) --------------------------------------------------------- III. means of combination syntax A. syntax of expressions What should the syntax be for expressions? how can we represent parse trees as linear text? B. commands and combinations of commands What commands do we need? IV. means of abstraction A. naming How should we name expressions and procedures? Do we want to have local declarations within expressions? B. parameterization and function declarations How should we declare parameters for procedures? Can we unify the two kinds of declarations? C. results from our discussion