We will later see a situation in which we can take
advantage of that, but for most uses equivalent results can be achieved by direct
reference, without introducing the problems of name references. We can simply
add an extra model element between the referrers and the reused element. The
references are directly to this new element, which in turn refers directly to the reused
element. At any stage, the new element can be altered to refer to a different element,
thus affecting all of its references.
15.1.4 Copy by Value in Models
When programmers copy an element of code by value, that is, by copying and pasting
it, it is immediately apparent which atomic elements have been copied: the particular
characters of the selection. These characters are however later interpreted by the
compiler, adding semantics above the level of characters. Some of the copied text
MODEL REUSE 399
will map to individual primitive commands, which will be copied by value. Other
parts will map to references by name to other functions, and while the references will
be copied, the content of the functions will not. Copy by value thus always includes
the idea that the copy is to a certain depth, at least if the copied content also makes use
of copy by reference.
When copying by value in a model, there is a greater range of choices.
Pages:
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770