Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add postfix:<i> to S03
It wasn't mentioned at all before, and since it's at the methodcall
level in rakudo, which may not be expected at first, I figured it was
worth mentioning. It also makes postfix:<i> the only operator at that
level to not start with a dot, which seems like another noteworthy
detail.
  • Loading branch information
ShimmerFairy committed Sep 19, 2015
1 parent e80063c commit bdbe964
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions S03-operators.pod
Expand Up @@ -25,7 +25,7 @@ each level. (Column 'A' is for "associativity", see following table.)
A Level Examples
= ===== ========
O Terms 42 3.14 "eek" qq["foo"] $x :!verbose @$array
L Method postfix .meth .+ .? .* .() .[] .{} .<> .«» .:: .= .^ .:
L Method postfix .meth .+ .? .* .() .[] .{} .<> .«» .:: .= .^ .: i
N Autoincrement ++ --
R Exponentiation **
L Symbolic unary ! + - ~ ? | || +^ ~^ ?^ ^
Expand Down Expand Up @@ -315,10 +315,10 @@ comma on the right--see List prefix precedence below.

=head2 Method postfix precedence

All method postfixes start with a dot, though the dot is optional
for subscripts. Since these are the tightest standard operator,
you can often think of a series of method calls as a single term that
merely expresses a complicated name.
All method postfixes (except for C<i>) start with a dot, though the dot is
optional for subscripts. Since these are the tightest standard operator, you can
often think of a series of method calls as a single term that merely expresses a
complicated name.

See L<S12> for more discussion of single dispatch method calls.

Expand Down Expand Up @@ -395,6 +395,17 @@ Dotted postfix form of any other prefix operator

=item *

Imaginary number postfix

42i
$foo\i

The only operator on this level that does not start with a dot. Turns a number
into a purely-imaginary number (a C<Complex> with a zero real part). Must be
backslashed if after a name, including C<Inf> and C<NaN>.

=item *

There is specifically no C<< infix:<.> >> operator, so

$foo . $bar
Expand Down

0 comments on commit bdbe964

Please sign in to comment.