| ||
Tutorial: Pattern References |
Some people view patterns reference attributes (syntactically:
What is a pattern reference?
A The reason behind the terminology "pattern" and "pattern reference" is that this might hint at the analogy with "object" and "object reference." Attributes denoting the "reference" variant may change (what it refers to) over time, whereas attributes denoting the short variant ("pattern"/"object") are immutable: the state of an object may change, but the attribute always denotes the same object. What does it look like?
The declaration uses the same marker as used in pattern concext
coercion, namely
Example 7A small example of using a pattern reference attribute:
"!" suffix is a computed object evaluation.
The semantics is that the expression in front of it is evaluated. It
must deliver one reference to an object (this is checked statically,
of course). That object is then executed. The
for -imperative is presented later, and so is
the explicit object instantiation operator,
"&" .
Now to something completely different, the next section is about co-routine sequencing. |