riff-lang / riff

The Riff programming language
https://riff.cx
BSD Zero Clause License
23 stars 1 forks source link

Default behavior of `for` loops with inferred downward ranges #52

Open darrylabbate opened 1 year ago

darrylabbate commented 1 year ago

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.