Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Perl v5.13.7 is released

by syphilis (Bishop)
on Nov 24, 2010 at 04:41 UTC ( #873361=note: print w/replies, xml ) Need Help??


in reply to Re^2: Perl v5.13.7 is released
in thread Perl v5.13.7 is released

I don't like that change. It adds more to the syntax confusion than it takes away.

My immediate reaction is also one of disappointment.
Given time, I expect we'll be able to push $arref1, $arref2
Not sure if that will make me more disappointed or less disappointed ....

Cheers,
Rob

Replies are listed 'Best First'.
Re^4: Perl v5.13.7 is released
by Anonymous Monk on Nov 24, 2010 at 07:32 UTC
    Given time, I expect we'll be able to push $arref1, $arref2
    I don't think so (if you expect that would be equivalent to push $arref1, @$arref2), because it's ambiguous (do you want to push the ref $arref2 itself or the array's elements?), while the current change isn't. Only the programmer can resolve that ambiguity...
      Only the programmer can resolve that ambiguity

      Hmph ... so much for perl's fabled DWIM capabilities !!!

      ;-)

      Cheers,
      Rob
        (do you want to push the ref $arref2 itself or the array's elements?)

      Interesting point, but wrong, I think. The change that 5.13.7 introduces only affects the first argument of a push; subsequent arguments behave as before.

      Alex / talexb / Toronto

      "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

        The change that 5.13.7 introduces only affects the first argument...
        That's all clear, but I understood syphilis to be talking about a hypothetical future extension of "$arref means @$arref" to the second argument, too. Otherwise why would he have said "Given time, I expect we'll be able to..." if it applies to what is possible already? But maybe I got him wrong.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://873361]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2020-01-19 11:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?