> Date: Fri, 11 Oct 2002 12:16:00 -0700 (PDT) > From: Larry Wall <[EMAIL PROTECTED]> > > I'm wondering whether the single ones could indicate parallel streams. > We had the difficulty of specifying whether the C<for> loop should > terminate on the shorter or the longer stream. We could say that | > terminates on the longer, and & on the shorter. Possibly there's > some relationship with any() and all() in there as well. The | could > generally be construed as a comma that doesn't guarantee ordering. > So cases could be written > > when 1 | 2 | 3 {...} > > as well as with comma. Saying > > when 1 & 2 & 3 {...} > > might be short for > > when all(1,2,3) {...}
Aha! Superpositions. | is for any, & is for all. That works :). Some of my students want to go: if ($x == 1 || 2) { ... } Now they can: if $x == 1 | 2 { ... } It reads well in english (which I am a strong supporter of). Better than "if x equals any one two." I do very much like this idea. Luke