riff icon indicating copy to clipboard operation
riff copied to clipboard

Default behavior of `for` loops with inferred downward ranges

Open darrylabbate opened this issue 2 years ago • 0 comments

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 avatar Dec 13 '22 07:12 darrylabbate