Why is backward index operator [^1] not zero based [^0]?
Thanks guys. With Nim aiming to be a Python alternative I guess it makes sense to copy their logic.
Why is backward index operator [^1] not zero based [^0]?
This might be controversial but if the first element is [0] I think the last element should be [^0]. Intuitively I would expect a[^n] == reversed(a)[n] Run Not really a question, more an opinion, but usability and intuition matters to me.