ALGOL 68 - Some Vanitas

Some Vanitas

For its technical intricacies, ALGOL 68 needs a cornucopia of methods to deny the existence of something:

skip, "~" or "?"C - an undefined value always syntactically valid, empty - the only value admissible to void, needed for selecting void in a union, void - syntactically like a mode, but not one, nil or "○" - a name not denoting anything, of an unspecified reference mode, or specifically int - a vacuum is an empty array (here specifically of mode int). undefined - a standards reports procedure raising an exception in the runtime system. ℵ - Used in the standards report to inhibit introspection of certain types. e.g. sema

c.f. below for other examples of ℵ.

The term nil is var always evaluates to true for any variable (but see above for correct use of is :/=:), whereas it is not known to which value a comparison x < skip evaluates for any integer x.

ALGOL 68 leaves intentionally undefined what happens in case of integer overflow, the integer bit representation, and the degree of numerical accuracy for floating point. In contrast, the language Java has been criticized for over-specifying the latter.

Both official reports included some advanced features that were not part of the standard language. This were indicated with an ℵ and considered effectively private. Examples include "≮" and "≯" for templates, the outtype/intype for crude duck typing, and the straightout and straightin operators for "straightening" nested arrays and structures.

Extract from the 1973 report:

§10.3.2.2. Transput modes a) modesimplout = union (≮ℒ int≯, ≮ℒ real≯, ≮ℒ compl≯, bool, ≮ℒ bits≯, char, char); b) modeouttype = ¢ an actual - declarer specifying a mode united from a sufficient set of modes none of which is 'void' or contains 'flexible', 'reference to', 'procedure' or 'union of' ¢; c) modesimplin = union (≮ref ℒ int≯, ≮ref ℒ real≯, ≮refcompl≯, ref bool, ≮ref ℒ bits≯, ref char, ref char, ref string); d) modeintype = ¢ ... ¢; §10.3.2.3. Straightening a) opstraightout = (outtype x) simplout: ¢ the result of "straightening" 'x' ¢; b) opstraightin = (intype x) simplin: ¢ the result of straightening 'x' ¢;

Read more about this topic:  ALGOL 68