In programming language theory, the qualification principle states that any semantically meaningful syntactic class may admit local definitions. In other words, it's possible to include a block in any syntactic class, provided that the phrases of that class specify some kind of computation. (Watt 1990)
A common examples for of this principle includes:
- block command -- a command containing a local declaration, which is used only for executing this command. In the following excerpt from a C program,
tmp
variable declared is local to the surrounding block command:
- block expression -- an expression containing a local declaration, which is used only for evaluating this expression. In the following excerpt from ML program, local declaration of
g
can be used only during evaluation of the following expression:
- block declaration is one containing a local declaration, the bindings produced by which are used only for elaborating the block declaration. In the following excerpt from ML program, local declaration of function
leap
, using an auxiliary functionmultiple
:
Famous quotes containing the word principle:
“I often wish for the end of the wretched remnant of my life; and that wish is a rational one; but then the innate principle of self-preservation, wisely implanted in our natures, for obvious purposes, opposes that wish, and makes us endeavour to spin out our thread as long as we can, however decayed and rotten it may be.”
—Philip Dormer Stanhope, 4th Earl Chesterfield (16941773)
Related Phrases
Related Words