X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=week9.mdwn;h=3f0911ab2a3af09a7007398ed912a08ff7dbf506;hp=43882882769af86ab790dbc9ae3f5600079f5e8b;hb=395e383abcd3b71a82f68339fad8a104a7a11a87;hpb=586f5a66ee7fda507a0c28605c012805098c278c diff --git a/week9.mdwn b/week9.mdwn index 43882882..3f0911ab 100644 --- a/week9.mdwn +++ b/week9.mdwn @@ -660,17 +660,18 @@ Programming languages tend to provide a bunch of mutation-related capabilities a Of course, in most languages you wouldn't be able to evaluate a comparison like `getter = getter'`, because in general the question whether two computations always return the same values for the same argument is not decidable. So typically languages don't even try to answer that question. However, it would still be true that `getter` and `getter'` (and `adder` and `adder'`) were extensionally equivalent. - However, they're not numerically identical, because by calling `setter 2` (but not calling `setter' 2`) we can mutate the function value `getter` (and `adder`) so that it's *no longer* numerically equivalent to `getter'` (or `adder'`). + However, they're not numerically identical, because by calling `setter 2` (but not calling `setter' 2`) we can mutate the function value `getter` (and `adder`) so that it's *no longer* qualitatively indiscernible from `getter'` (or `adder'`). -* A fourth grade of mutation involvement... +* A fourth grade of mutation involvement: (--- FIXME ---) structured references (a) if `a` and `b` are mutable variables that uncoordinatedly refer to numerically the same value then mutating `b` won't affect `a` or its value (b) if however their value has a mutable field `f`, then mutating `b.f` does affect their shared value; will see a difference in what `a.f` now evaluates to + (c) examples: Scheme mutable pairs, OCaml mutable arrays or records