Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusion in documentation of < > #38

Closed
pmichaud opened this issue Jan 2, 2015 · 4 comments
Closed

Confusion in documentation of < > #38

pmichaud opened this issue Jan 2, 2015 · 4 comments
Labels
docs Documentation issue (primary issue type)

Comments

@pmichaud
Copy link
Collaborator

pmichaud commented Jan 2, 2015

Entering "< >" in the search box currently lists three entries:
Postcircumfix: .< > leads to routine/.<%20> (currently 404 not found)
Circumfix: < > leads to routine/<%20>
Quote: < > leads to syntax/<%20>

I don't think there should be a "circumfix" entry, as < > is not an operator, nor is there a circumfix:«< >» function/routine. As far as I can tell, it's purely a syntactic construct.

I suspect the same should be said for postcircumfix .< > -- as far as I know it's not a routine in its own right -- it's really syntactic sugar for .{< >} . It's not an operator in its own right (e.g., that could be overloaded).

@awwaiid
Copy link
Contributor

awwaiid commented Nov 20, 2015

Right now these are some nodes like "This is not a real operator, just syntactic sugar that is turned into the { } postcircumfix operator at compile-time." for postcircumfix.< > -- do you think that a similar note for circumfix: < > will suffice?

@AlexDaniel
Copy link
Member

@awwaiid I think yes.

@AlexDaniel AlexDaniel added docs Documentation issue (primary issue type) and removed affects content labels Jun 24, 2016
@AlexDaniel
Copy link
Member

OK, so:

  • Postcircumfix: .< > leads to here. It clearly says In most cases, a dot may be placed before a postfix or postcircumfix: (implies that it is not an operator on its own), but then it also says Technically this is not an operator, but syntax special-cased in the compiler.. So no problem here.
  • Quote: < > leads to here. Again, I don't think that there's any problem with that.

However, there's now < > in Routine category: https://docs.perl6.org/routine/$LESS-THAN_SIGN%20$GREATER-THAN_SIGN and it says:

The quote-words construct. Breaks up the contents on whitespace, and returns a List of the words. If a word looks like a number literal or a Pair literal, it is converted to the appropriate number.

So at this point the most appropriate title for this ticket is: < > is listed as a circumfix operator, but it is not a real operator. Is that right?

@gfldex
Copy link
Contributor

gfldex commented Jul 15, 2016

fixed with 22ddf6d b3dc4f2 2eb85f3

@gfldex gfldex closed this as completed Jul 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation issue (primary issue type)
Projects
None yet
Development

No branches or pull requests

5 participants