On Sat, Feb 12, 2005 at 12:41:19AM -0600, Rod Adams wrote:
> >I've given here.  For example, a junction can have a value like:
> >   $x = ($a & $b) ^ ($c & $d)
> >which is true only if $a and $b are true or $c and $d are true but not
> >both.
> 
> That's why I allowed for virtual sets, defined by a closure.

Oops, I missed that part.  Sorry.

> Of course we'll always have C<grep>. But this is Perl, and I want YAWTDI.
> After all, another way to test membership was just added, whereas before 
> you pretty much just had C<grep>.

...another way to test membership was added...?

> My issue is less that lists and sets are radically different. It is much 
> more a matter of Junctions and Scalars are radically different. Getting 
> me to accept that a Scalar holds several different values at once is a 
> hard sell. Especially when you consider duplicated side effects.

Since Scalars can be objects that are fairly complex aggregations
that simultaneously hold (or appear to hold) multiple different 
values at once, this doesn't seem like a strong argument.

> And what happens if you attempt to evaluate a junction in a non-boolean 
> context?

I dunno, which context are you concerned about?

   $a = any(2,3,4);
   $b = ? $a;                 # boolean context, $b == true
   $n = $a + 3;               # numeric context, $n == any(5,6,7)
   $s = $a ~ 'x';             # string context, $s == any('2s', '3s', '4s')
   @l = ($a);                 # list context, @l == (any(2,3,4))

Pm

Reply via email to