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

more Unicode dots as infix operators #24269

Closed
tpapp opened this issue Oct 22, 2017 · 1 comment · Fixed by #26262
Closed

more Unicode dots as infix operators #24269

tpapp opened this issue Oct 22, 2017 · 1 comment · Fixed by #26262
Labels
domain:unicode Related to unicode characters and encodings parser Language parsing and surface syntax

Comments

@tpapp
Copy link
Contributor

tpapp commented Oct 22, 2017

This is a feature request to add (\dots) and (\cdots) as infix operators, possibly with the same precedence as .. (8).

Currently, cannot be used as a function name at all, while works, but is not infix:

julia> (a,b) = a+b
ERROR: syntax: invalid character ""

julia> (a,b) = a+b
 (generic function with 1 method)

julia> 12
ERROR: UndefVarError: 2 not defined

julia> (1,2)
3

This would be useful to define alternatives to : (with different, but related semantics) in packages. @timholy's IntervalSets.jl uses .., other operators would be good to have to avoid conflict.

(Incidentally, font rendering of these characters was discussed in #8636, but as they are supported already I assume this is not an issue).

@JeffBezanson JeffBezanson added the parser Language parsing and surface syntax label Oct 22, 2017
@ararslan ararslan added the domain:unicode Related to unicode characters and encodings label Oct 22, 2017
@stevengj stevengj added the status:triage This should be discussed on a triage call label Feb 26, 2018
@JeffBezanson
Copy link
Sponsor Member

Looks like we should add \cdots to the .. precedence level at least. I'm less sure about \dots, and that would be a less breaking change since it's currently disallowed.

@mbauman mbauman removed the status:triage This should be discussed on a triage call label Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:unicode Related to unicode characters and encodings parser Language parsing and surface syntax
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants