Sep 12, 2003 ------------- - Back to "times" - "times" of our lives and their bindings - Birth - sex - parents - siblings (possibly) - dob - Christening - name - nickname - Education - degree - Living - spouses - Death - beneficiary of a will - Some are static, some are dynamic - static: unchangeable and usually means upfront - dynamic: modifiable - "Earlier" times mean - safety - reliability - efficiency - "Later" times mean - flexibility - Interpreted languages - most bindings happen at runtime - Compiled languages - many bindings are static - Names, an important concept in imperative languages - used for variables, labels, procedures, functions - earlier languages had pre-defined names - Attributes of a name - length - connector characters - case sensitivity - reserved words and keywords - When used for variables, new attributes - name - address - value - type - scope - lifetime - Think about - x = x+1 - what does this mean? - Difference between - l-value - r-value - Associations between addresses to names - one-one (regular variables) - one-many (aliasing) - many-one (local variables) - Type - a set of values with defined operations - Scope - region of program where var is visible - Lifetime - time during which variable is associated with a memory cell - What are types useful for? - compliance check - better allocate storage - type equivalence - structural equivalence - C (except for structs) FORTRAN, ALGOL - name equivalence - C++, Ada - declaration equivalence - Modula, Pascal - Handout containing type declarations in various languages