1.1.8 Procedures as Black-Box Abstractions Flashcards
When is a procedure regarded to be black-box?
When at any given moment, we are not concerned with how the procedure computes its result, but only with the fact that it computes it.
procedural abstraction
The level of abstraction in which the details of how a procedure is computed can be suppressed, to be considered at a later time.
abstraction in Computer Science
A concept that a user should not need to know how a procedure is implemented in order to use it.
bound variable (in procedures)
The name of a formal parameter in a procedure, which does not change the meaning of a procedure definition even when consistently renamed throughout the definiton
scope of a name
The set of expressions in which a name is defined or valid. In a procedure definition, the bound variables have the body of the procedure as their scope and will not have any meaning outside of it.
free variable (in procedures)
Variables or names within a procedure that are not bound to the procedure and have meaning outside of the procedure body.
block structure
Nesting of definitions that provides a solution to the simplest name-packaging problem.
free variable (in procedures)
Variables or names within a procedure that are not bound to the procedure and have meaning outside of the procedure body.
lexical scoping
Allows inner procedures to access variables defined in their enclosing procedures without the need for explicit parameter passing.