Re: Scary things

2002-04-16 Thread Larry Wall
Buddha Buck writes: : It's weirder when you allow multiple guard conditions to be true with no : guarantee of evaluation order. But I see no reason to disallow it. Well, Perl would guarantee the order. I can see situations where it'd be better to force a random pick to avoid starvation proble

Re: Scary things

2002-04-16 Thread Larry Wall
Piers Cawley writes: : Also known as constructs you wish you hadn't discovered. : : So, I'm reading through Finkel and I came across the following, which : computes the greatest common divisor of a and b (recast into perl6ish : syntax) : : while { : when $a < $b { $b -= $a } : when $b

Re: Scary things

2002-04-16 Thread Buddha Buck
At 05:51 PM 04-16-2002 +0100, Piers Cawley wrote: >Also known as constructs you wish you hadn't discovered. > >So, I'm reading through Finkel and I came across the following, which >computes the greatest common divisor of a and b (recast into perl6ish >syntax) > > while { > when $a < $b { $b

Scary things

2002-04-16 Thread Piers Cawley
Also known as constructs you wish you hadn't discovered. So, I'm reading through Finkel and I came across the following, which computes the greatest common divisor of a and b (recast into perl6ish syntax) while { when $a < $b { $b -= $a } when $b < $a { $a -= $b } } The idea is that