On Sat, 09 Sep 2017 19:53:53 -0700, tomentiru...@gmail.com wrote:
> > my @h is default([])
> []
> > @h[0].push: 3
> [3]
> > @h
> []
> > @h[0]
> [3]
>
> > my %h is default({})
> {}
> > %h = 3
> 3
> > %h
> {}
> > %h
> {b => 3}
>
> The array/hash variable's default is an empty array/hash literal.
On Sat, 09 Sep 2017 19:53:53 -0700, tomentiru...@gmail.com wrote:
> > my @h is default([])
> []
> > @h[0].push: 3
> [3]
> > @h
> []
> > @h[0]
> [3]
>
> > my %h is default({})
> {}
> > %h = 3
> 3
> > %h
> {}
> > %h
> {b => 3}
>
> The array/hash variable's default is an empty array/hash literal.
# New Ticket Created by Andrew Buchanan
# Please include the string: [perl #132053]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=132053 >
> my @h is default([])
[]
> @h[0].push: 3
[3]
> @h
[]
> @h[0]
[3]
> my %h is
Heh.
FWIW we had this since forever:
https://gist.github.com/Whateverable/78168042a011e01fc768c042b0d91898
On 2017-09-09 19:53:53, tomentiru...@gmail.com wrote:
> > my @h is default([])
> []
> > @h[0].push: 3
> [3]
> > @h
> []
> > @h[0]
> [3]
>
> > my %h is default({})
> {}
> > %h = 3
> 3
> > %h