Larry Wall wrote: > On Sun, Aug 24, 2008 at 09:22:25PM +0200, Moritz Lenz wrote: > : Moritz Lenz wrote: > : > Tests 34 to 36 were a bit overcritical: > : > > : > (0|undef && say "not ok 34") || say "not ok 34"; > : > (0&undef && say "not ok 35") || say "not ok 35"; > : > (0^undef && say "not ok 36") || say "not ok 36"; > : > > : > but are easily corrected. The rest seem fine to me. > : > : Easier said than done. > : Question to p6l: do && and || autothread? Or do they collapse the > : junction prior to evaluation? (I hope the latter, since I think it's > : more dwimmy). > : > : Also do prefix:<?> and prefix:<!> collapse the junction? > > I think it would be best if all boolean contexts collapse consistently, > and I would consider all of those to be boolean contexts. More > precisely, && and || are boolean on the left, but not on the right.
Very good. As a follow-up for the testers: should ok() expect an Object as its first argument? If so we could say ok 1|2, 'Junction 1|2 is true in boolean context'; (Which has the nice side effect of not confusing fudge because more tests are executed than expected). Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/