Computer Science 340
Programming Languages
Fall 2019, Siena College
Lecture 15: Names, Bindings, and Scopes
Date: Wednesday, October 9, 2019
Agenda
- Announcements
- no classes on Friday!
- Problem Set 4: [HTML] [PDF] due Sunday night
- Exam 1 Monday night
- Exam 1: practice questions, format, etc.
- Problem Set 2 back and brief discussion
- Names, binding, and scopes
- programs in the "names" example
- discussion guided by responses in the Google document
Terminology
- keywords
- reserved words
- aliases
- binding: static and dynamic
- type inferencing
- strongly-typed language
- type checking
- type coercion
- type errors
- storage binding
- allocation and deallocation
- lifetime of a variable
- static, stack-dynamic, explicit heap-dynamic, implicit heap-dynamic allocation and deallocation
- run-time stack
- heap
- scope and visibility
- local, non-local, global variables
- scope rules: static/lexical vs. dynamic
Examples
Links