# New Ticket Created by Zoffix Znet
# Please include the string: [perl #131783]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=131783 >
The current behaviour kinda makes sense when you squint at it, but today we had
a user[^1]who was surprised by it, so I'm filing it as a ticket, if maybe
there's some Better Way this can be done with.
When you :delete an element from the Array, you get nqp::null stuffed into the
position, which gets converted to `is default` value when you look it up again:
<Zoffix__> m: use nqp; my @a is default(42) = <a b c>; @a[1]:delete; dd @a
<camelia> rakudo-moar b14721: OUTPUT: «Array @a = ["a", 42, "c"]»
However, if you now convert that Array to a Slip or a List, the hole is left as
a bare Mu and doesn't get turned into a default value, which is lost:
<Zoffix__> m: use nqp; my @a is default(42) = <a b c>; @a[1]:delete; dd
@a.Slip
<camelia> rakudo-moar b14721: OUTPUT: «slip("a", Mu, "c")»
<Zoffix__> m: use nqp; my @a is default(42) = <a b c>; @a[1]:delete; dd
@a.List
<camelia> rakudo-moar b14721: OUTPUT: «("a", Mu, "c")»
So it makes sense that without `is default` you don't get an `is default`
value, but at the same time, Mu is not a great value to deal with...
[1] https://irclog.perlgeek.de/perl6/2017-07-22#i_14908846