# not compile
#var a: array[0..<3, int]
var b: array[0.. <3, int]
for i in 0..<3:
discard
for i in 0.. <3:
discard
var d: array[0..100, int]
var e = d[0..^1]
var f = d[0.. ^1]
... better in beauty, and ruby already so
btw: why not use negative index to represent reverse index?
I want 0.12.0. I want 0.12.0. I want 0.12.0. Important thing needs to say thrice. 0.0
mogu: btw: why not use negative index to represent reverse index?
Because that can lead to subtle bugs, such as s[0..n-1] when n == 0 (which is generally intended to return the empty string rather than the entire string).
As for which syntax looks better, that's a matter of taste.