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

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

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
August 23, 2012 17:57
Subject:
Re: fixing smartmatch just hard enough (and when, too)
Message ID:
20120824005657.GB23667@cancer.codesimply.com
* Damian Conway <damian@conway.org> [2012-08-23T20:30:49]
> Jesse Luehrs suggested:
> 
> > (especially when is_prime(any(9, 10, 11)) should still work fine for
> > any sane or reasonable implementation of any()).
> 
> The problem is not the sane and reasonable implemenation of any().
> The problem is the sane and reasonable implementation of is_prime().
> 
> Junctive arithmetic isn't the same as numeric arithmetic, especially when
> you construct nested junctions (as you often need to do).
> [ etc. ]

I only wanted to butt in here and note that Perl6::Junction, the junction
implementation we'd be likely to steal from, only implements comparison across
junctions.  We don't end up with a number of fancy other features that have
been discussed like returning junctions magically from subroutine calls or
doing any(1,2,3)+2, etc.

I just want to get that out in the air.  I didn't think it was an issue for the
sake of putting a junction on the rhs, but with more talk of junctions on the
lhs, I think it may be an elephant in the room.

-- 
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