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
@a[1..*] adds trailing undef value #876
Comments
From @moritz23:55 <@moritz_> rakudo: my @a = 1..4; say @a[1..*].perl It should just be [2, 3, 4]. Cheers, |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in b/t/spec/S02-builtin_data_types/whatever.t |
|
The RT System itself - Status changed from 'new' to 'open' |
From @moritzOn Wed Apr 08 14:59:19 2009, moritz wrote:
Since the discussion came up on #perl6 if this is really the expected As the end-point of a range, a lone "whatever" means "to the maximum say @calendar[5..*]; # Same as: say @calendar[5..11] or "to the largest allocated index" (if there are no fixed indices): say @data[1..*]; # Same as: say @results[1..5] It doesn't mention how the postcifcumfix:<[ ]> is supposed to introspect Which is why I CC: p6l to get some ideas or clarification, and if we Cheers, |
From frettled@gmail.comOn Wed, Aug 19, 2009 at 1:54 PM, Moritz Lenz via RT <
I like it the way S09 says it. But there is a problem with sparse arrays, isn't there? S32/Containers (S32-array) says this about elems:
For arrays, it appears that using end is more relevant:
Does that seem usable to y'all? |
From dataweaver@gmail.comOn Wed, Aug 19, 2009 at 5:37 AM, Jan Ingvoldstad<frettled@gmail.com> wrote:
Given that it's relatively easy to say "1..^*", I wouldn't mind
There shouldn't be, because there shouldn't be sparse arrays - at If we're not going to follow this rule, then I see no reason why we That said, a case could be made that the custom indexing model is too
This is exactly what the division between standard and custom indexing -- |
From @pmichaudOn Wed, Aug 19, 2009 at 04:54:10AM -0700, Moritz Lenz via RT wrote:
The short answer is that 1..* isn't a WhateverCode object, it's a Range Pm |
From sohtil@gmail.comCurrent Rakudo considers 1..* a Range object: $ ./perl6
However, @a[1..*] does not terminate: $ ./perl6
... no response This is Rakudo Perl 6, version 2010.07-115-g0839993 built on parrot |
From @masak<TimToady> rakudo: my @a = 1,2,3,4; say @a[1..*] |
From sohtil@gmail.comThere is also an older ticket about .[1..*]: #64566 |
|
The RT System itself - Status changed from 'new' to 'open' |
From sohtil@gmail.comSee also the recent report about .[1..*] in #77422. |
From @TimbusAfter a day of thinking heavily, drinking heavily and asking IRC folk, This would require a bit of code rewiring in Range though, which makes |
From @pmichaudNow fixed in nom branch: pmichaud@kiwi:~/nom$ ./perl6 Since a test is already recorded in whatever.t, I'm closing the ticket. Pm |
|
@pmichaud - Status changed from 'open' to 'resolved' |
From @moritzTest passes on latest rakudo/nom, closing ticket. |
Migrated from rt.perl.org#64566 (status was 'resolved')
Searchable as RT64566$
The text was updated successfully, but these errors were encountered: