tl;dr: CS draws a useful distinction between numeric symbols having a
trivial association with some significance, and other symbols with a non-trivial
association. Context is vital to avoid BSF's specialty, cross-context
equivocation.
Note: You probably don't really want to get me started on this
kind of esoterica, do you?
Symbol:
1: an arbitrary sign
(written or printed) that has acquired a conventional significance.
2:
something visible that by association or convention represents something else
that is invisible; "the eagle is a symbol of the United States"
OK.
It's clear that context has not been taken into account. (In the following
context, I use the following convention: the rabbit-ears symbol " sets off a
direct quote; the tic ' sets off a meta-usage. Remembering the significance of
these symbols is an example for the above definition.)
The "arbitrary sign"
'4' "has acquired a conventional significance" of 'the integer number
that succeeds three', in most contexts. However, in a text-message context, it
"has acquired a conventional significance" of the word 'for' or any syllable
that is homophonic to 'for', in addition to the other "conventional
significance". It is only the context that gives meaning to the terms
"conventional significance", "convention", and "association".
A
'telephone number' is a string of digit-symbols that does not have a numeric
meaning — it's purely a symbolic code-value that has significance in two
contexts: ordinarily, it's the code for (or 'name' of) the RJ11 hole in
someone's wall, or of a mobile telephone unit. In the telco context, it's the
symbol which the telco associates with the network routing to get connected to
that RJ11 or mobile unit. Originally, the telco operator looked at the labels
on the switchboard to identify the jack to put the plug into (label → hole
is the association). Early dial exchanges used a positional encoding — the
last two digits, say 36, meant up 3 rows, rotate six columns on the selected
Strowger switch leading to the subscriber line. Nowadays, the telco uses a
database lookup to make the association. That means it's not a number, it's a
symbol, possibly encoded, but without numeric significance.
In many CS
contexts, the rules of association for symbols depends on the structure of the
symbol, and the immediate context of use. Usually, a sequence of digit-symbols
associates directly with a value in the mathematical abstraction called
'number': thus, in common usage, the sequence of digit-symbols is often called a
'number', whether it's appropriate or not. A sequence of letter-symbols often
associates with some other mathematical abstraction, always (or nearly so)
requiring some dictionary (directory, symbol table, etc) to implement the
association. Some 'numbers' have the same quality, sometimes.
(Grant me
leeway on the specific meanings of sequence, digit-symbol and letter-symbol, and
on the approximations to common rules of association: this is intended to be
tutorial, not definitive.) There are many variations, in specific languages,
but they follow this outline. For example, APL uses the spacing overscore
‾ as the first symbol of a negative number; COBOL allows a digit-symbol
sequence to associate with a paragraph-name or section-name; Pascal allows the
number to denote – associate with – a label. For the Pascal case,
in particular, I wrote in the standards that labels are associated on their
"apparent integral value"1, 2; in COBOL-74, digit-string
paragraph-names are denoted by the actual sequence of digit-symbols3.
Context is of the essence here.
An array is a mapping between a
dense (for non-sparse arrays) set of index values onto a set of elements of the
array — this is a direct mapping, since the conventional correspondence is
a trivial closed-form arithmetic function, possibly using the classic expression
index × stride + offset. In most cases of interest, where the
set of symbols is not dense or not numeric, the mapping is non-trivial,
requiring use of some function of greater complexity.
In the Pascal and COBOL
examples, above, the label/paragraph-name is associated with a program-point.
This means that the domain of mapping (correspondence function) is the label or
paragraph-name and the domain is its associated program-point. This kind of
non-trivial mapping is usually done using a table of 2-tuples, with a primary
key on the label/paragraph-name member. In the COBOL case, it's a string value
in that column, where a leading zero is part of the string; in Pascal, it's an
integer, a number, with any number of insignificant leading zeros. Big deal.
It's still a non-trivial mapping.
Again, the ordinary dictionary definition
calls upon some 'conventional' rules of association. In CS, as in other
mathematical disciplines, it is conventional for the rules of association to be
strongly, rigorously, and inextricably tied to context.
Again, aren't we glad
that programming provides such well-defined contexts that we only have to deal
with such subtleties when we're writing language definitions or dealing with
obfuscatory equivocations by lawyers and the like, and that most of us don't
ever need to deal with them?
1 American National Standard
Pascal Computer Programming Language, ANSI/IEEE 770X3.97-1983, Clause
6.1.6.
2 ANSI/IEEE Standard for the Programming Language
Extended Pascal, ANSI/IEEE 770X3.160-1989, Clause 6.1.8.
3
American National Standard Programming Language COBOL, ANSI X3.23-1974,
Clause 5.3.2.2.1.1.--- --Bill. NAL: question the answers, especially
mine. [ Reply to This | Parent | # ]
|