Skip to content
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

Inconsistency between Array.splice and Buf.splice candidates #5693

Closed
p6rt opened this issue Sep 26, 2016 · 3 comments
Closed

Inconsistency between Array.splice and Buf.splice candidates #5693

p6rt opened this issue Sep 26, 2016 · 3 comments
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Sep 26, 2016

Migrated from rt.perl.org#129358 (status was 'rejected')

Searchable as RT129358$

@p6rt
Copy link
Author

p6rt commented Sep 26, 2016

From @zoffixznet

several combinations of Whatever and Callable candidates that are present in Array.splice are missing from Buf.splice. I think for consistency reasons, both variants should offer the same collection of candidates​:

[ZoffixW] m​: my @​a = <1 2 3>; @​a.splice​: *, *, <42 72>; say @​a
[camelia] rakudo-moar 5d909c​: OUTPUT«[1 2 3 42 72]␤»
[ZoffixW] m​: my $b = Buf.new​: <1 2 3>; $b.splice​: *, *, <42 72>; say $b
[camelia] rakudo-moar 5d909c​: OUTPUT«Cannot resolve caller splice(Buf​: Whatever, Whatever, List); none of these signatures match​:␤ (Buf​:D \SELF​: *%_)␤ (Buf​:D $​: Int $offset, $size = Whatever, *%_)␤ (Buf​:D $​: Int $offset, $size, int $got, *%_)␤ (Buf​:D $​: Int $offset, $size,…»

@p6rt
Copy link
Author

p6rt commented Oct 2, 2016

From @zoffixznet

<Zoffix> After a day of hacking on this, I think I'm going to reject https://rt-archive.perl.org/perl6/Ticket/Display.html?id=129358
<Zoffix> Bufs have a bit different candidates in that they take native int arrays, or other Bufs, and they replacement arrays need to have int things in them. So basically exact match between Array.splice and Buf.spice won't happen.
<Zoffix> That leaves to adding Callable and Whatever candidates to Buf.splice, but IMO that's overengineering, and the 31 candidates for Arrays.splice are telling of that.
<Zoffix> So I'm going to reject that ticket, until there's any reasonable usecase for why Buf.splice needs Callable/Whatever candidates.

http://irclog.perlgeek.de/perl6-dev/2016-10-02#i_13322672

@p6rt p6rt closed this as completed Oct 2, 2016
@p6rt
Copy link
Author

p6rt commented Oct 2, 2016

@zoffixznet - Status changed from 'new' to 'rejected'

@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

1 participant