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

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

Thread Previous | Thread Next
From:
Yuval Kogman
Date:
July 14, 2006 14:26
Subject:
Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained
Message ID:
20060714212608.GA19536@woobling.org
On Fri, Jul 14, 2006 at 09:22:10 -0700, Dave Whipp wrote:
> Darren Duncan wrote:
> 
> >Assuming that all elements of $a and $b are themselves immutable to all levels of recursion, === then does a full deep copy like eqv.  If at any level we get a mutable object, then at 
> >that point it turns into =:= (a trivial case) and stops.
> 
>   ( 1, "2.0", 3 ) === ( 1,2,3 )
> 
> True or false?

false

> More imprtantly, how do I tell perl what I mean? The best I can think of is:
> 
>   [&&] (@a »==« @b)
> Vs
>   [&&] (@a »eq« @b)

Neither - it's on the natural types. If the types are different it's
!=

-- 
  Yuval Kogman <nothingmuch@woobling.org>
http://nothingmuch.woobling.org  0xEBD27418


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