OCaml - Tuples - partial bindings (using _) - creation - Pattern matching - Higher Order Functions - Definition - Implementing / Reading examples - Anonymous functions - Equivalence of local bindings <==> anonymous function calls - Variants - Discriminated Union -- definition/terminology - Holding information vs. not (of ) - Creating a new instance of the variant e.g. Int 4, Add (VarX, VarY) - Pattern matching - function vs. fun - Recursive Types - definition - Example: Natural Numbers - mapping to recursive functions - Expression trees - Folding - left vs. right fold - definition: combiner vs. initial value vs. list element - all three can be different types! - applying an example Variables - Six Attributes - Name - Address - Value - Type - Lifetime - Scope Bindings - definition - binding time - language design - language impl. - compile time - load time - run time - static vs dynamic - type inference Lifetime - creation (allocation) - destruction (deallocation) - Four categories - static - stack-dynamic - explicit heap-dynamic - implicit heap-dynamic Scope - Scoping rules - Static scoping - Dynamic scoping - Creating scope: Functions, Blocks, Let - Categories: - local - nonlocal - global - Referencing environment Expressions - Terms: - Operators, Operands, Parentheses, Function calls - Operators types: Unary vs. Binary vs. Ternary - Evaluation order: - Operator precedence (+ definition) - Operator associativity (+ definition) - Of function calls / parameters - Operators as function calls - operator overloading - operator defining - Side Effects - definition - prevention - Referential Transparency (+ definition + example) - Casting - definition - modes - promotion vs. narrowing vs. widening vs. user-defined - Relations - Equality - loose vs. strict vs. strong - Ordering/Comparison - implementation - Booleans - Short circuit evaluation - Assignment - Syntax - Conditional Assignment - Compound Assignment - Unary Assignment - Multiple Assignment Statements - For ALL statements: - design decisions - Sequenced - Selection - two-way - dangling else resolution - multi-way - Iterative - infinite - pre-test - post-test - counter-controlled - data-structure controlled - syntactic sugar (automatic code transformation for java, C++, Python, etc) - Control - break - continue - goto - usage + design -- is it a good idea to have/use these? Subprograms - Process Abstraction - three parts - entrypoint definition - caller vs. callee - Activation Record - Parameters - Dynamic Link - Return Address - Locals - Semantics (what happens when) - Caller - Callee - Return - Executing a Program - code vs. data - tracing an example - Nested Subprograms - locating a non-local reference - Static Scoping - Static Link - trace an example - cost? - Dynamic Scoping - Deep Access - trace the dynamic links - Shallow Access - central location for all (map>) Parameters - Signature - Formal vs. Actual - Correspondence (name vs. location) - Semantic Passing Modes - in vs. out vs. in-out - Actual Passing Modes - For each be able to trace an example! - Pass-by-Value - Pass-by-Result - Pass-by-Value-Result - Pass-by-Reference - Pass-by-Name - Passing Arrays - Decay - definition - Multidemensional & single-dimension in C/C++