[EMAIL PROTECTED] commits:
> New Revision: 10077
> Modified: doc/trunk/design/syn/S02.pod
> ==
>
> -foo.bar # foo().bar -- postfix prevents args
> +foo.bar # foo().bar -- illegal postfix
Smylers wrote:
[EMAIL PROTECTED] commits:
New Revision: 10077
Modified: doc/trunk/design/syn/S02.pod
==
-foo.bar # foo().bar -- postfix prevents args
+foo.bar# foo().bar -- illegal postfix
S03 says:
Binary === tests type and value correspondence: for two value
types, tests whether they are the same value (eg. 1 === 1); for
two reference types, checks whether they have the same identity
value. For reference types that do not define an identity, the
Over at #perl6 we had a short discussion on =:=, ===, and ~~, mostly raised by
ajs's discussion on Str items and ===.
After a brief discussion we managed to formulate several questions that we feel
are slightly to totally unresolved.
1. what is .id on references? Is it related to the memory slot,
If we do have deep value equality checks, then "default" == and eq
are probably:
sub &infix:<==> ( $x, $y ) {
+$x === +$y;
}
sub &infix: ( $x, $y ) {
~$x === ~$y;
}
So that the compare-as-sometype behavior is retained from perl 5
wi
I would assume that all classes automatically define:
multi submethod *infix: ($self: $?CLASS) { $self }
so that derived classes can automatically:
$obj.as
Without actually changing their implementation details (only the type
that Perl currently thinks it's dealing with polymorphically).
In
Jedai and I went through some of pugs current implementations. Here's a list of
what we expect the operators to return and what they currently do.
This does not exactly agree with S03 right now, but is our opinion.
Force into a type before comparing values:
42 == 42 - true, same numeric
On Wed, Jul 12, 2006 at 08:40:53AM -0400, Aaron Sherman wrote:
: Smylers wrote:
: >[EMAIL PROTECTED] commits:
: >
: >
: >>New Revision: 10077
: >>Modified: doc/trunk/design/syn/S02.pod
:
>>==
: >>
: >>-foo.bar
On Wed, 2006-07-12 at 19:25 +0300, Yuval Kogman wrote:
> Over at #perl6 we had a short discussion on =:=, ===, and ~~, mostly raised by
> ajs's discussion on Str items and ===.
*wave*
> 1. what is .id on references? Is it related to the memory slot, like refaddr()
> in Perl 5?
That's something I
On Wed, Jul 12, 2006 at 04:16:13PM -0400, Aaron Sherman wrote:
> On Wed, 2006-07-12 at 19:25 +0300, Yuval Kogman wrote:
> > 4. will we have a deep (possibly optimized[1]) equality operator, that
> > *will* return true for @foo = ( [ 1, 2 ], 3 ); @bar = ( [ 1, 2 ], 3 );
> > op(@foo, @bar)?
> > Is i
On 7/12/06, Aaron Sherman wrote:
There's a problem here, from my point of view. I'll take it one
assumption at a time:
* $whatever.as.id ~~ $whateverelse.as.id is true
if and only if $whatever := $whateverelse at some point in the
past, either explicitly, or through some so
On Wed, 2006-07-12 at 15:32 -0500, Jonathan Scott Duff wrote:
> On Wed, Jul 12, 2006 at 04:16:13PM -0400, Aaron Sherman wrote:
> > On Wed, 2006-07-12 at 19:25 +0300, Yuval Kogman wrote:
> > > 4. will we have a deep (possibly optimized[1]) equality operator, that
> > > *will* return true for @foo =
On Wed, Jul 12, 2006 at 16:16:13 -0400, Aaron Sherman wrote:
> Isn't that ~~?
>
> Per S03:
>
> Array Array arrays are comparablematch if $_ »~~« $x
>
> ~~ is really the all-purpose, bake-your-bread, clean-your-floors,
> wax-your-cat operator that you're looking for.
Not at al
On Wed, Jul 12, 2006 at 17:58:03 -0400, Aaron Sherman wrote:
> Then ~~ is wrong in that respect, and I think we should be talking about
> that, not about making === into "~~, but without invoking code when it
> shouldn't."
But it should! It's the smart match! If the rhs matches the code ref
(the
On Wed, Jul 12, 2006 at 16:16:13 -0400, Aaron Sherman wrote:
> The other way to think about === would be that it tells you if its LHS
> *could* be constant-folded onto its RHS (if it were constant for long
> enough)
What is the benefit here?
> Because of the word "deep". Deep implies arbitrary w
Author: larry
Date: Wed Jul 12 18:05:24 2006
New Revision: 10156
Modified:
doc/trunk/design/syn/S02.pod
doc/trunk/design/syn/S03.pod
Log:
Clarifications from Smylers++ and ajs++.
Modified: doc/trunk/design/syn/S02.pod
===
Yuval Kogman wrote:
On Wed, Jul 12, 2006 at 17:58:03 -0400, Aaron Sherman wrote:
Then ~~ is wrong in that respect, and I think we should be talking about
that, not about making === into "~~, but without invoking code when it
shouldn't."
But it should! It's the smart match! If the rhs
On Wed, Jul 12, 2006 at 12:51:57PM -0400, Aaron Sherman wrote:
: I would assume that all classes automatically define:
:
: multi submethod *infix: ($self: $?CLASS) { $self }
Hmm, "as" is really only intended for explicit type mutation (which
can work either by role mixin or by new object constru
18 matches
Mail list logo