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
substr on compact array #3806
Comments
From @coke3 tests here that need fixing or review: my uint8 @buffer = ('A' .. 'Z').map({ .ord }); yields: # Failed test 'substr on compact array (1)' -- |
1 similar comment
From @coke3 tests here that need fixing or review: my uint8 @buffer = ('A' .. 'Z').map({ .ord }); yields: # Failed test 'substr on compact array (1)' -- |
From @AlexDanielOh wow, that's really interesting… and old. I don't think that substr should work like this. Normal arrays are stringified by 「substr」, why would it do something completely different for a native array? So for both UInt and uint8 arrays I'd expect “65 66 67” as an output. I think this ticket is rejectable as soon as someone can justify it better than me. On 2015-05-12 09:54:38, coke wrote:
|
The RT System itself - Status changed from 'new' to 'open' |
From @timoThe tests are bogus just the assumption that a substr of length 8 will give you 8 bits rather than 8 bytes, that's already wildly inconsistent with what substr does otherwise. really this code looks like the desire to have `vec` from perl5 implemented in perl6 by re-using the substr name. I think it's the wrong peg to hang this feature off of. |
From @timoAlso, the design docs say you get the same kind of buffer back from substr on a buf, but we have subbuf for that now. |
Removing the tests and closing the ticket. |
Migrated from rt.perl.org#124455 (status was 'open')
Searchable as RT124455$
The text was updated successfully, but these errors were encountered: