MacPack provides a class HyperWindoid from which Bob wants to subclass his own class BobWindoid . Furthermore, Bob would like to share the script among many pages, so he'd like to have the entire script in a single BobUtilities.js file. There exist other alternatives in between the dynamic execution model and the static model that also solve Bob's problem. One of them is described at the end of this chapter. In a pure dynamic execution model the entire program is processed in one pass.
Declarations take effect only when they are executed.
A declaration that is never executed is ignored. Scheme follows this model, as did early versions of Visual Basic. The dynamic execution model considerably simplifies the language and allows an interpreter to treat programs read from a file identically to programs typed in via an interactive console. For example, a script or library could define additional functions and classes if it runs on an environment that supports CSS unit arithmetic while still working on environments that do not. The dynamic execution model requires identifiers naming functions and variables to be defined before they are used.