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

Reduce number of range and slice operators #239

Closed
gingerBill opened this issue Aug 1, 2018 · 1 comment
Closed

Reduce number of range and slice operators #239

gingerBill opened this issue Aug 1, 2018 · 1 comment
Assignees

Comments

@gingerBill
Copy link
Member

Current:

x[a..b] // half-closed
x[a...b-1] // open
for i in 0..N {} // half-closed
for i in 0...N-1 {} // open
switch x {
case a..b: // half-closed
case x...y: // open
}

Proposed:

x[a:b] // half-closed
for i in 0..N-1{} // open
switch x {
case x..y: // open
}

Rationale: removes confusion between .. and ... and adds familiarity for slicing from languages such as Python and Go.

@Tetralux
Copy link
Contributor

Tetralux commented Aug 1, 2018 via email

gingerBill added a commit that referenced this issue Aug 1, 2018
Replace .. and ... with : and ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants