In conventional programming languages, programmers use "variables" as names in their programs. These names are, strictly speaking, equivalent to storage locations. When a variable name is used, it implicitly means that the value stored in that location is wanted. This is why statements such as "I = I + 1" make sense in languages like as Fortran. It means that the contents of location "I" are being changed by an addition operation.
In Sisal, however, names refer to values, not locations. We really do not care about storage in Sisal, so the location of a value is unimportant to us; only the values themselves concern us in writing Sisal code. A statement such as the increment operation above is incorrect in Sisal, both syntactically and semantically. The name "I" must correspond to a value, and if a new or different value is desired, it must be given a new name. But this need not be as awkward in practice as it may seem to be in concept. It is consistent with mathematical convention. In Sisal programs, values and their associated names have transitory natures, existing only between the times of their creation and their final use by other program elements.
Here's the the let-in example we last dealt with:
let one := sin(x)*sin(x) + cos(x)*cos(x); two := sqrt(one+one+one+one) three := one + two in one, two, three, sqrt(two) end letIn it, the names "one", "two", and "three" are defined and used, and are then discarded. They are said to be undefined outside the scope of that statement. This dynamism, while familiar to mathematicians, is quite foreign to most programmers, and takes some getting used to. User-defined data types in Sisal reflect the dynamic nature of the language as well as names, but in a slightly different way.
The Sisal Language Project has been approved as a Designated Unclassified Subject Area (DUSA) K19222, as of 07 August, 1991.
LLNL Disclaimer
UCRL-MI-122601