I'm afraid to dirty this thread too much more with my ramblings, but this is what I had in mind looks much like the syntax you presented. It's just that the adverbial part would come closer to the beginning so the programmer would start thinking about the special case before doing the comparison mentally.
if ( :authority<AKC> $name1 > $name2 ) { #... }
I'm not sure if just any bracket should be allowed, or if a special set should be necessary. The parsing for an infix operator could collect all the named parameters up front, though, starting from the opening of the context. It could continue until it sees the operator, then use the previous value and the following value as the operands/positional parameters.

With this:

if :authority<AKC> { $name1 > $name2 > $name3 } { # ... }
or this:
if :authority<AKC> { $name1 > $name2 && $name1 > 0 } { # ... }
the list of optional parameters could be used for every infix operator in the context.

Since Perl6 supports chained comparisons, the syntax you report is either ambiguous or cumbersome from what I can tell. Does this place both operators in the context:

if $name1 > $name2 > $name3 :authority<AKC> { #... }
or is this necessary:
if $name1 > $name2 :authority<AKC > $name3 :authority<AKC> { #... }
Furthermore, if you're comparing things does it even make sense that all the comparisons are not done in the same way? How often do you compare the EBCDIC ordinal for the letter 't' to the ASCII ordinal for 'd'? Who wants to know if the before-tax income of one employee is higher than the after-tax income of another? These things should be possible for the sake of flexibility in case someone really needs to do something requiring that. However, what's the syntax for that now? Is it even smart in that situation to connect the adverb to the verb instead of an adjective to the noun? If one needs two different contexts, they should be able to use methods on their objects to get the values. It only makes sense to use the adverbial form when they're all going to be in the same context.

This example has a bug in it if the latter syntax above is correct:

if $letter_1 > $letter_2 :lc > $letter_3 { # what if $letter_3 is a capital? }
That bug wouldn't be possible if the adverb controlled a block context.

In reply to Re^3: my new article, "A Romp Through Infinity" by mr_mischief
in thread my new article, "A Romp Through Infinity" by John M. Dlugosz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.