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

Default behavior of for loops with inferred downward ranges #52

Open
darrylabbate opened this issue Dec 13, 2022 · 0 comments
Open

Default behavior of for loops with inferred downward ranges #52

darrylabbate opened this issue Dec 13, 2022 · 0 comments
Labels
language Language features/requests

Comments

@darrylabbate
Copy link
Member

darrylabbate commented Dec 13, 2022

E.g.

for i in 10..0 {
  ...
}

vs

for i in 10..0:-1 {
  ...
}

This is mainly annoying with ranges built with variables - when either bound of the range causes the inferred direction to flip, it's unexpected and almost never intentional.

@darrylabbate darrylabbate added the language Language features/requests label Dec 13, 2022
darrylabbate added a commit to darrylabbate/aoc that referenced this issue Dec 13, 2022
riff-lang/riff#2
riff-lang/riff#28 - min(), push(), sort(), sum()
riff-lang/riff#36 - Boolean exprs should be coercible in arithmetic
riff-lang/riff#51
riff-lang/riff#52
@darrylabbate darrylabbate changed the title Deafault behavior of for loops with inferred downnward ranges Default behavior of for loops with inferred downward ranges Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language Language features/requests
Projects
None yet
Development

No branches or pull requests

1 participant