Isn't "transitive" the wrong word?

Janice Caron caron800 at googlemail.com
Sat Apr 5 12:39:09 PDT 2008


On 05/04/2008, Manfred Nowak <svv1999 at hotmail.com> wrote:
> Janice Caron wrote:
>
>  > STATEMENT 2:
>  > const is transitive in D, but not in C++.
>  > In what sense is statement 2 equivalent to statement 1?
>
> The clause "with respect to reachability" is conviniently omitted,
>  because it should be clear from the context.

Aha - so

(1) "const" is short for "const with respect to reachability", and

(2) "const with respect to reachability" actually means "(a is const)
and (b is reachable from a) implies (b is const)".

So, when we say "const is transitive", what we /in fact/ mean is:

((a is const) and (b is reachable from a) implies (b is const)) and
((b is const) and (c is reachable from b) implies (c is const))
implies ((a is const) and (c is reachable from a) implies (c is
const))

Now why didn't I see that before? It's just so blindingly obvious!
(The sarcasm wasn't aimed at you, by the way. Thanks for explaining).

So, we're all clear, right? Everyone understands why we say "const is
transitive", not "const is recursive"?



More information about the Digitalmars-d mailing list