On Tue, Jul 02, 2013 at 01:41:20PM +0200, Rafael Garcia-Suarez wrote: > On 27 June 2013 03:59, Ricardo Signes <perl.p5p@rjbs.manxome.org> wrote: > Also $href->%* I suppose. > Can we talk about failure modes a bit? > A common idiom is to write @{ $foo || [] } in case $foo might be undefined. > Do you remember the conditional-dereference operator that was > bikeshedded to oblivion? ($foo?->bar() was one of the proposed > syntaxes). Can we have this, plus ->@*, plus ?->@* that would expand > to an empty list if its argument is undef? Ultimately it wasn't bikeshedded to oblivion. rjbs attempted to restart things, asking questions about how it was supposed to work, independent of its spelling, in certain unconsidered situations, such as LVALUE context. No-one answered. And that question is actually relevant. What would this do for undefined $foo? $foo->@* = @bar; @bar = $foo->@*; Presumably for what you're suggesting, in LVALUE context, $foo autovifies. In RVALUE context it does not (but does not error either) Nicholas ClarkThread Previous | Thread Next