Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow infix:<.> if next thing is alphabetic
As much as I mistrust "fluent" programming, we already have an infix:<.=> operator, so it's not a big stretch to have infix:<.>. We limit it to actual method names so that we can detect (most) accidental use of P5's use of . for concatenation. Note that this is a term/infix distinction now, so .meth where a term is expected still defaults to $_. Community standards for method cascades will likely ask for whitespace around infix:<.> to make a visual disinction from the term form, but we don't enforce that, if for no other reason than to refrain from giving the fluent programmers something to yammer on about. Basically, I've decided that the slight possibility for greater confusion is outweighed by consistency with .= and utility of have a . that can also serve as a precedence modifier. (Since both .= and . parse leftward with item assignment precedence, but rightward as a term.)
- Loading branch information
Showing
2 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters