Aug 27, 2003 ------------- - Desiderata for computer languages - readability - writeability - efficiency, safety, reliability - What improves readability? - simplicity - minimize #ops/basic units - e.g., think of APL - minimize #ways to do same thing - e.g., incrementing - minimize #meanings for something - e.g., * in C - maximize orthogonality - reduce exceptions - be able to put together things independently - minimize side effects - e.g., X = read(); print X + X; versus print read() + read(); - reasonableness of words to their intuitive meanings - good control structures - support for data abstraction - this last one also helps writeability - The readability axis - machine code on one end, followed by - assembly language - Perl - C/C++ - COBOL - NOWEB (literate programming) - Efficiency/safety - good memory management - good type systems - check types and validate - prevent stupid programmers from succeeding! - e.g.: ZX Spectrum - exception handling - Good example of a "safe" human language - Esperanto - Other things to know about langauges - is it meant for a compiler/interpreter? - whats the difference? - notion of "times" - what type of architecture? - e.g., von Neumann gives rise to imperative languages - where do logic and functional motivate from? - Self study - Chapter 1 - Chapter 2