CS 3304: Comparative Languages
Subprograms
[
Course Documents
] : [
Subprograms
]
Previous
Contents
Next
Keyword Index
Subprogs as Params: Issues (cont.)
What is the correct referencing environment for a subprogram that was sent as a parameter?
Possibilities:
It is that of the subprogram that called it (shallow binding)
It is that of the subprogram that declared it (deep binding)
It is that of the subprogram that passed it (ad hoc binding, never been used)
For static-scoped languages, deep binding is most natural
For dynamic-scoped languages, shallow binding is most natural