Define Shallow and Deep binding for referencing environment of subprograms
that have been passed as parameters?
Answers
Answered by
2
Answer:
Explanation: Shallow Binding is to use the environment of the call statement that CALLS the passed subprogram. Most natural for dynamic-scoped languages. Deep Binding is to use the environment of the definition of the passed subprogram. Most natural for static-scoped languages.
Answered by
0
Shallow and Deep binding for referencing environment of subprograms
that have been passed as parameters:
Shallow binding:
The call statement's environment, which executes the given subprogram is called shallow binding.
Deep binding:
The environment in which the passed subprogram is defined as deep binding.
- The subprogram that declares a subprogram may also go through that subprogram as a parameter in some cases.
- Deep binding and ad hoc binding are interchangeable in those situations.
Similar questions