Re: r24325 - docs/Perl6/Spec

2008-12-16 Thread Patrick R. Michaud
On Mon, Dec 15, 2008 at 11:18:54PM -0500, Mark J. Reed wrote: > On Mon, Dec 15, 2008 at 5:41 PM, Moritz Lenz wrote: > > I know at least of infix:(Num $a, Num $b) (which does the same as > > Perl 5's <=>) and infix:(Pair $a, Pair $b) (which does $a.key cmp > > $a.key || $a.value cmp $b.value), so n

Re: r24325 - docs/Perl6/Spec

2008-12-15 Thread Mark J. Reed
On Mon, Dec 15, 2008 at 5:41 PM, Moritz Lenz wrote: > I know at least of infix:(Num $a, Num $b) (which does the same as > Perl 5's <=>) and infix:(Pair $a, Pair $b) (which does $a.key cmp > $a.key || $a.value cmp $b.value), so numbers and pairs DWIM. Hm. Rakudo doesn't let me cmp pairs at all

Re: r24325 - docs/Perl6/Spec

2008-12-15 Thread Moritz Lenz
Uri Guttman wrote: >> "LW" == Larry Wall writes: > > >>> infix: does numeric comparison if both operands are numbers, and > >>> string comparison otherwise. > > LW> That is a bit of an oversimplification. > > LW> Any type may define infix: however it likes for two arguments of >

Re: r24325 - docs/Perl6/Spec

2008-12-15 Thread Uri Guttman
> "LW" == Larry Wall writes: >>> infix: does numeric comparison if both operands are numbers, and >>> string comparison otherwise. LW> That is a bit of an oversimplification. LW> Any type may define infix: however it likes for two arguments of LW> its own type. It may also defin

Re: r24325 - docs/Perl6/Spec

2008-12-15 Thread Larry Wall
>> infix: does numeric comparison if both operands are numbers, and >> string comparison otherwise. That is a bit of an oversimplification. > "Cmp" (like "eqv") depends on the particular type, so to sort a certain > way, you should need only to coerce the values to the right type: > > @st

Re: r24325 - docs/Perl6/Spec

2008-12-15 Thread David Green
On 2008-Dec-14, at 11:21 am, Moritz Lenz wrote: Uri Guttman wrote: how is sort ordering specified? Currently it is not specified, it defaults to infix:. If you can suggest a non-confusing way to specify both a transformation closure and a comparison method, please go ahead. how does it k

Re: r24325 - docs/Perl6/Spec

2008-12-14 Thread Moritz Lenz
Uri Guttman wrote: >> "p" == pugs-commits writes: > > p> This document attempts to document the list of builtin functions in > Perl 6. > p> It assumes familiarity with Perl 5 and prior synopses. > p> @@ -870,6 +870,10 @@ > p> comparisons. C<@by> differs from C<$by> in that each c

Re: r24325 - docs/Perl6/Spec

2008-12-13 Thread Uri Guttman
> "p" == pugs-commits writes: p> This document attempts to document the list of builtin functions in Perl 6. p> It assumes familiarity with Perl 5 and prior synopses. p> @@ -870,6 +870,10 @@ p> comparisons. C<@by> differs from C<$by> in that each criterion is p> applied, in or