Hacker News new | ask | show | jobs
by macintux 1025 days ago
Slicing a list, when the first index is invalid for that list, could easily throw an exception instead.
1 comments

This should signal an explicit error, which invalid index is indeed. If user believes for some reason the invalid indexing is ok, then it could be caught and handled. No ambiguity.