-
Notifications
You must be signed in to change notification settings - Fork 551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re: using '-1' in array range fails #83
Comments
From @AbigailNo. The reason it isn't in Perl is that the list 3 .. -1 is empty. Now, theoretically, one could modify perl such that it recognizes 3 .. -1 I once argued with a language developer about this; he wanted to be able array [x .. x - 1] would be empty for all x, except x == 0, where the slice suddenly is the Negative indices were eventually dropped; just because of this oddity. Perl doesn't suffer from this oddity, because .. is a list constructer, Abigail |
From @AbigailOn Mon, May 03, 1999 at 07:10:54PM +0200, Rob Urban wrote:
No. The reason it isn't in Perl is that the list 3 .. -1 is empty. Now, theoretically, one could modify perl such that it recognizes 3 .. -1 I once argued with a language developer about this; he wanted to be able array [x .. x - 1] would be empty for all x, except x == 0, where the slice suddenly is the Negative indices were eventually dropped; just because of this oddity. Perl doesn't suffer from this oddity, because .. is a list constructer, Abigail |
Migrated from rt.perl.org#886 (status was 'resolved')
Searchable as RT886$
The text was updated successfully, but these errors were encountered: