Method and apparatus for providing dynamically scoped variables within a statically scoped computer programming language
AssigneeMicrosoft Corporation
InventorsDavid R. Hanson, Todd A. Proebsting
Life of this patent
Estimating the term…
Abstract
A programming language is provided that permits the use of both dynamically scoped variables and statically scoped variables, and that allows a programmer to select which scoping is desired for a particular variable. The programming language comprises at least one language construct for defining statically scoped variables to be used if a static scoped variable is desired and at least one language construct for defining dynamically scoped variables to be used if a dynamically scoped variable is desired. A method, apparatus, and computer-readable medium are also provided.
Claims16
A computer implemented method for providing a computer environment for utilizing a programming language, the programming language comprising a plurality of scoped variables, to enable a programmer to select a desired scoping for a particular variable when creating a computer program, the method comprising:
- providing in the computer environment, at least one language construct for defining statically scoped variables to be used if a static scoped variable is desired;
- and
- providing, in the computer environment, at least one language construct for defining dynamically scoped variables to be used if a dynamic scoped variable is desired, wherein the scope of an instance of the dynamically scoped variable comprises an executable code segment, the executable code segment comprising a thread and all of the functions called within the thread.
A computer-readable medium having computer-executable instructions, which when executed on a computer, cause the computer to utilize a programming language, in which variables are statically scoped, to perform a method for providing dynamically scoped variables to be used in the creation of computer programs, the method comprising:
- providing within the programming language at least one construct for declaring dynamically scoped variables;
- and
- providing within the programming language at least one construct for accessing dynamically scoped variables in a defined scope, wherein the scope of an instance of a dynamically scored variable comprises an executable code segment, the executable code segment comprising a thread and all of the functions called within the thread.
Dependencies are inferred from the claim text.