Arc Forumnew | comments | leaders | submitlogin
1 point by evanrmurphy 5530 days ago | link | parent

Glad the 'ssexpand works, I should have tried that.

Python's indexing doesn't wrap around infinitely, but that doesn't mean Arc's couldn't.



1 point by fallintothis 5530 days ago | link

Hence "To model indexing after Python". I figure Python's probably a good source of inspiration for Python-like features. ;)

Admittedly, I can't find specific rationale for IndexErrors discussed anywhere. Perhaps throwing errors for egregious indices just seems the "sane" thing to do. Essentially, it's a choice of foist: if indexing wraps around infinitely, you need to check bounds when you don't want to wrap around; if indexing throws errors, you need to mod explicitly when you do want to wrap around.

-----

1 point by evanrmurphy 5530 days ago | link

> if indexing wraps around infinitely, you need to check bounds when you don't want to wrap around; if indexing throws errors, you need to mod explicitly when you do want to wrap around.

Good summary. I agree that index-out-of-bound errors are the saner default.

-----