On Mon, Jul 20, 2009 at 7:15 PM, Darren Duncan<dar...@darrenduncan.net> wrote: > Jon Lang wrote: >> >> On Mon, Jul 20, 2009 at 6:03 PM, <pugs-comm...@feather.perl6.nl> wrote: >>> >>> Modified: docs/Perl6/Spec/S03-operators.pod >>> =================================================================== >>> --- docs/Perl6/Spec/S03-operators.pod 2009-07-20 23:56:21 UTC (rev >>> 27634) >>> +++ docs/Perl6/Spec/S03-operators.pod 2009-07-21 01:03:38 UTC (rev >>> 27635) >>> @@ -42,7 +42,7 @@ >>> X Junctive and & also >>> X Junctive or | ^ >>> L Named unary sleep abs sin temp let >>> - N Nonchaining infix but does <=> leg cmp .. ..^ ^.. ^..^ >>> + N Structural infix but does <=> leg cmp .. ..^ ^.. ^..^ >>> C Chaining infix != == < <= > >= eq ne lt le gt ge ~~ === eqv !eqv >>> X Tight and && >>> X Tight or || ^^ // min max >> >> Hmm... maybe "Chaining infix" should become "Comparison"? > > I second that notion, > > ... assuming that the category would not later be expanded with other > operators that don't fit the Comparison description.
"Tight or" includes min and max; I see nothing wrong with the "Comparison" precedence level eventually picking up a handful of operators that aren't comparators, as long as so many of them are. And especially if the question being asked when creating a new operator is "should this have the same precedence as the comparison operators?" A stronger argument against it would be to find comparison operators that exist at other precedence levels. I don't think that there are any. (Well, besides <=>, leg, and cmp.) Indeed, I'll be surprised if there are any other precedence levels that are chaining - which is another key point: what kind of operator would be chaining, but _not_ some sort of comparison? > And please don't even consider instead using the term "Relational" in > reference to these operators, that some people do. The "Comparison" term is > more descriptive, and it doesn't conflict with other meanings of > "relational" that relational databases deal with. Seconded. :) -- Jonathan "Dataweaver" Lang