Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a22bfa7f8c3db86e

Jump to content

// Workers AI · dad joke modeWhat did the qualification principle say? I'm qualified to make a principle decision.

From Wikipedia, the free encyclopedia

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:
if (a > b) {
    int tmp;
    tmp = a;
    a = b;
    b = tmp;
}
  • 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:
let
    val g = 9.8
in
    m * g * h
end
  • 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 function multiple:
local
    fun multiple (n: int, d: int) = 
          (n mod d = 0)
in
    fun leap (y: int) = 
          (multiple (y,4)
          andalso not multiple (y, 100))
          orelse multiple (y,400) 
end

References

[edit]
  • Watt, David A. (1990) [1990]. "Bindings". Programming Language Concepts and Paradigms. Prentice Hall. pp. 82–83. ISBN 0-13-728874-3.