On Wednesday, April 01 2009 07:38 am, Richard Hainsworth wrote:
> Right now, yes.  I'm arguing that the way that they're designed to
> work doesn't DWIM.  Try a slightly different example:
>     0 <= $x <= 1 # 0 is less than $x is less than 1.
>     $x ~~ 0..1 # $x is in the range of 0 to 1.
> I submit that most people would expect these two statements to be
> conceptually equivalent to each other: they may go about tackling the
> issue from different angles, but they should always end up reaching
> the same conclusion.  But as things stand now, if $x = -2 | 2, these
> result in two very different conclusions: the first evaluates as true,
> the second as false.  This most certainly doesn't do what I mean until
> I have been indoctrinated into the intricacies of Perl and learned to
> think like it does - which runs directly counter to the principle of

When you say DWIM, I take it you mean that there is an assumption that $x is a 
point in a field (http://en.wikipedia.org/wiki/Field_theory_(mathematics)).  
As you have illustrated, junctions do no form a field.

You would run into the similar problems if $x was a point in a ring 
(http://en.wikipedia.org/wiki/Ring_(mathematics)).   Consider the ring of 
"integers modulo 8":
        my Ring8 $x = 5 + 3;            # evaulates to "0"
        say "OMG, its 0!" unless $x;    # prints the message 
which does not DWIM if I am expecting $x to be part of a field.

Maybe the problem is that junctions are too easy to create, which is causing 
people to confuse the "mathematical" structure of the space created by using 
a junction with that of the structure of the space of the underlying 
(non-junctioned) object.


Reply via email to