Hello I'd like to know if you think it could be feasible to have a Python-like syntax for indices in array and vector?
I find it so obvious and practical.
let i = ~[1, 2, 3, 4, 5]
i[1] returns a the second item ("2")
i[1:] returns ~[2, 3, 4, 5]
i[:-2] return ~[1, 2, 3, 4]
i[-2] returns ~[4, 5]
i[1,-1] returns ~[2, 3, 4]
Thanks !
-----
Gaetan
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
