Language Design and Evolution - definitions - language, tokens, rules, keywords, symbols, identifiers - syntax vs semantics - language transformation - role of compiler - firsts - program, language, commercial programming language - History of Programming Languages - Know the general trends over time - The Beginnings (FORTRAN, LISP, COBOL, C) - 1980 - 1994 (C++, Python, MATLAB) - 1995 - 2009 (Java, Javascript, Ruby, C#) - 2010 - Present (Dart, Swift, Rust) Classes of Languages - Ways to compare languages - Declarative vs. Imperative - Structured vs. Non-structured - Compiled vs. Interpreted - Modern classes - Procedural - Functional - Object-Oriented - Data-Driven/Query - Multi-Paradigm Compiled and Interpreted Languages - Language Translation Pipeline - Know each step, relevant terms - Running a Program - language virtual machine - language runtime - Compilers vs. Interpreters - Language Definition vs. Implementation - Performance Differences Syntax - definition - Grammars - BNF/EBNF - Able to read a grammar - Able to modify a grammar - forcing precedence as additional rule(s) - Left-most derivation - Parse Tree - Ambiguity Semantics - definition - Attribute grammars - synthesized vs. inherited vs. intrinsic attributes - examples: type safety for assignment and operations - Operational Semantics - Denotational Semantics - example: integer string -> integer value - Axiomatic Semantics - Hoare Triple - Weakest Precondition - examples for sequenced instructions - Proof of Program correctness - sequence, selection, while-loops - Loop invariant - definition - example - identifying WHERE the loop invariant must be true Types - Primitives - boolean, integer, floating-point - reason for name - implementations in different languages - Pointers and References - similarities and differences - case studies with C++ - Sum Types - choice between one of many (or) - enumerations vs. optional vs. expected vs. variant - Product Types - aggregation - records vs. tuples - memory representation - Strings - primitive/built-in vs library - immutability - descriptors - operations - Arrays - formal definition - elements vs indices - row vs. column major - storage categories - descriptors - shape - memory representation - Associative Arrays - formal definition - key vs. value - Lists - terms: cons, car, cdr - constructing/destructing lists - memory representation OCaml - The OCaml Trinity - type - value - expression - Types - int, float, string, 'a list - Operations - integer vs floating point (vs string) - Bindings - value store - function definition - 'rec' keyword - how functions are evaluated - partial function evaluation - local bindings - Control Flow - if-then-else - pattern matching - _ wildcard - in-order check of value, type, expression - Lists - empty list - operations: cons, append, hd, tl - Tail Recursion - formal definition - transformation to/from a while loop - (local) internal recursive function