there was always a confusing with the range syntax in languages, which led to a lot of off by one errors. This was addressed in modern languages by using iterators (which we should definitely support at some point, see https://github.com/zksecurity/noname/issues/132). But ranges are still confusing. Rust even introduced a new notation, 0..3 and 0..=3 which imo looks great but doesn't make things less confusing.
How about we only support ranges that look like this: 0..=3 to emphasize that we're ranging from 0 to 3 including 3? I'm not sure if it's a stupid idea.
there was always a confusing with the range syntax in languages, which led to a lot of off by one errors. This was addressed in modern languages by using iterators (which we should definitely support at some point, see https://github.com/zksecurity/noname/issues/132). But ranges are still confusing. Rust even introduced a new notation,
0..3
and0..=3
which imo looks great but doesn't make things less confusing.How about we only support ranges that look like this:
0..=3
to emphasize that we're ranging from 0 to 3 including 3? I'm not sure if it's a stupid idea.