develooper Front page | perl.perl6.language | Postings from August 2006

Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained

Thread Previous | Thread Next
From:
Smylers
Date:
August 13, 2006 01:20
Subject:
Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained
Message ID:
20060813074743.GA18378@stripey.com
On July 14th Yuval Kogman wrote:

> On Fri, Jul 14, 2006 at 11:42:24 +0100, Smylers wrote:
> 
> > I'm afraid I still don't get it.
> > 
> > Or rather, while I can manage to read an explanation of what one of
> > these operators does and see how it applies to the variables in the
> > examples next to it, I am struggling to retain a feeling of _why_ I
> > would want to use any of these operators in real-life Perl 6 code.
> 
> To compare deep structures ;-)
> 
> > Already in Perl 5 having 2 different equality operators is something
> > that learners often stumble over.
> 
> But only for low level types. To see if two objects are the same, or
> two hashes, you need to use Data::Compare, or to overload either ==
> or eq, neither of which is a perfect fit.
> 
> I have to catch my flight, so I'll explain more later.

Hi there.  Ann's (excellent, very useful, and much appreciated) summary
reminded me that this was still pending.  Did you catch your flight?

For the benefit of anybody else who's struggling to remember a thread
from a month ago this was my original request.

  Please could the proponets of the various behaviours being discussed
  here share a few more concrete examples which start by explaning a
  scenario in which there is a desire to do something, preferably one
  that Perl 5 coders can identify with, and then show how one of these
  new operators would meet that desire (and that without that operator
  it would be hard or clumsy to achieve the same thing)?

Cheers.

Smylers

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About