develooper Front page | perl.perl5.porters | Postings from August 2012

Re: Re: fixing smartmatch just hard enough (and when, too)

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
August 22, 2012 18:38
Subject:
Re: Re: fixing smartmatch just hard enough (and when, too)
Message ID:
20120823013812.GA20294@cancer.codesimply.com
* Ricardo Signes <perl.p5p@rjbs.manxome.org> [2012-08-22T20:29:15]
> * Damian Conway <damian@conway.org> [2012-08-22T19:55:41]
> > Hmmmm. In light of my arguments in defending bidrirctional overloading,
> > and of chromatic's observation regarding the relative ease of various types
> > of inversion-of-control on error reporting, I'm now convinced the
> > proposal should be:
> >
> > [ most of table elided ]
> >     Any      Any                   undef (with fatalizable warning)
> 
> I agree, including with the spirit of this one quoted line, although it
> should be "false" and not "undef." :-)
> 
> I've been checking my mail while away from home, and making notes on the
> various things that had come up, and this proposal covers all the same things
> I'd wanted to say, so I am very happy that I can just say, "yes, this."

...and as soon as I got in bed, I realized that there were two cases I'd
conflated in my reply, which I think need to be considered a bit more in my
head.

Case one:     $x ~~ *main

Case two:  $y = 1.23;  print $y;  $x ~~ $y;

My gut is that both should warn, and only the first should fail.  This is
really just my gut impression as I hop out of bed to get this reply posted,
though.  Back to bed now.

-- 
rjbs

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