If x and y are integer variables or any other variables of a “simple” type, then the meaning of the assignment x:&equil;y is quite similar in different programming languages. The value of y is copied (into a register) and then stored into x so that a fresh copy of the value of y becomes the current value of x. On the other hand if x and y are compound objects the the situation is quite different: some languages don't allow assignments at all, and other languages call for a conditional copying depending on the form of the right hand side. This paper argues for a unified view on assignment with semantics, that can be described in terms independent of the complexity of the type of the variables involved. We also present some alternatives to assignments and discuss their consequences for programming with complex data types.
[1]
Craig Schaffert,et al.
Abstraction mechanisms in CLU
,
1977,
Commun. ACM.
[2]
C. A. R. Hoare,et al.
Procedures and parameters: An axiomatic approach
,
1971,
Symposium on Semantics of Algorithmic Languages.
[3]
Dana S. Scott.
Mathematical concepts in programming language semantics
,
1971,
AFIPS '72 (Spring).
[4]
C. A. R. Hoare,et al.
Proof of correctness of data representation
,
1975,
Language Hierarchies and Interfaces.
[5]
Edsger W. Dijkstra,et al.
A Discipline of Programming
,
1976
.
[6]
Jacob T. Schwartz,et al.
Optimization of Very High Level Languages - I. Value Transmission and Its Corollaries
,
1975,
Comput. Lang..