Computer Science 340
Programming Languages
Fall 2023, Siena College
Lecture 12: Names, Bindings and Scopes
Date: Tuesday, October 17, 2023
Agenda
- Announcements
- Problem Set 4: [HTML] [PDF] is your outside of class focus for this week
- Wrap up Lab 5: More Syntax if you haven't already
- Names, bindings, and scopes
- variables
- names
- addresses
- types
- values
- binding
- type bindings
- storage bindings
- scope
- global scope
- named constants
- Some time to wrap up Lab 5: More Syntax and/or
get help with Problem Set 4: [HTML] [PDF]
- Assignment due in Canvas at the start of our next class: Read
Sebesta Chapter 5, and indicate that you have done so by
entering your name as your response in the Canvas assignment. This
assignment is worth 15 points in the "Assignments" category. We
will be spending some time in class on Thursday working through some
of the questions at the end of the chapter as a group.
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