Map
Index
Random
Help
Topics
th

Topic: replacement as setting a reference to a value

topics > computer science > data > Group: replacement or assignment



Topic:
replacement as moving information
Topic:
variable as reference to a value
Topic:
variable as reference to storage

Summary

The left hand side of a replacement denotes a reference to a variable. The right hand side denotes a value. After the replacement, the left hand side refers to a value equivalent to the right hand side. The left hand's physical reference is a literal; it does not change. The right hand's value is logical which only needs to match the value referenced by the left hand side. (cbb 5/80)
Subtopic: transfering value up

QuoteRef: reynJC5_1970 ;;313 r := v is to cause the reference denoted by r to possess the value denoted by v "
Quote: after an assignment, the value denoted by the variable is the same as the value from the expression [»hoarCA8_1978]
QuoteRef: goldA3_1976 ;;9 "To hand an object d the meaning '3' in Smalltalk, we say: .hand. d<-3!" .hand. indicates literal name follows, ! says do it
QuoteRef: hehnEC7_1975 ;;20 assignment by name .larrow. value where type matches
QuoteRef: richM_1974 ;;13 lmode gets lvalue (address) and rmode gets rvalue eg e1 := e2 generate new object with lmode value of e1 and rmode value of e2

Subtopic: copy vs. reference up

Quote: in CLU, an assignment causes sharing; after 'x:=y' both x and y refer to the same object [»liskB_1996]
Quote: a copy constructor creates a copy; zapping a value does not change other initializations [»dehnJC4_1998]
Quote: Modula-3 objects are assigned by reference; to copy an object, copy its fields [»cardL_1991]

Subtopic: variable as value up

Quote: a variable denotes a fixed address whose content is its value [»straC3_1973]

Subtopic: assignment vs initialization up

Quote: assignment and initialization are different operations; assignment only applies to properly constructed objects

Related Topics up

Topic: replacement as moving information (4 items)
Topic: variable as reference to a value (21 items)
Topic: variable as reference to storage
(12 items)

Updated barberCB 12/04
Copyright © 2002-2008 by C. Bradford Barber. All rights reserved.
Thesa is a trademark of C. Bradford Barber.