If you don't care about `i` itself just do `repeat...
# codingconventions
k
If you don't care about
i
itself just do
repeat(max) { ... }
f
Makes sense
k
And otherwise go with zero indexing, everything else in the language is zero-indexed.
f
I guess if I use the index in a way that starts at 1 it would make sense to use
1..x
k
Sure, but make sure to complain at the developers of that thing!
d
can you break out of the repeat {} ? I don’t think you can, can you?
k
No, unfortunately not.
f
@karelpeeters Let's say in each repetition I want to print the number of the current round in a human-readable way (starting at 1). Would it then make sense to use
1..x
or should I add +1 inside the loop?
k
If you're never actually indexing with it, I'd say
1..x
is fine. Otherwise definitely zero-index and +1.
f
@karelpeeters Did you see my new response to the 3 months old thread?
k
Yea, it's on my todo list :)
f
I didn't mean to be impatient, it's just the 1st time that I wrote a new message into such an old thread and I wasn't sure if you get notified
k
Yeah I was at work