Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^4: Can @_ be extended?

by Ven'Tatsu (Deacon)
on Feb 11, 2005 at 15:51 UTC ( #430149=note: print w/replies, xml ) Need Help??

in reply to Re^3: Can @_ be extended?
in thread Can @_ be extended?

Typeglobs will go away in Perl6, but they will be replaced by a more consistent := aliasing operator. In Perl5 you would write *foo = \@bar in Perl6 you would write @foo := @bar.

Though if I read Apocalypse 6 correctly then

sub foo (@foo is rw) { ... } foo(@bar);
Will alias @bar to @foo, in the same way as @foo := @bar does, for that call.

I don't see a reason to avoid typeglobs if you must alias something in Perl5. Ponie (Perl5 running on Parrot) will certainly support typeglobs, and I don't a good reason to compleatly throw away a useful (but seldom to be used) technique just because the next major version of Perl will not use that syntax for aliases. Should I stop using objects in Perl5 because Perl6 has a totally different object syntax?

Replies are listed 'Best First'.
Perl5 features not present in perl6 (was Re: Can @_ be extended?)
by Tanktalus (Canon) on Feb 11, 2005 at 16:27 UTC

    Don't get me wrong - I completely agree that you can't throw something away just because it won't be in perl 6 (since pretty much the whole perl5 language would be thrown away). However, I think that tphyahoo's comment was more based on the "seldom used" part of your comment: there are some "more advanced" areas of perl 5 which, if you aren't already comfortable with them, may not be worth the effort to learn at this point. I'm not sure that typeglobs are in that category, but, as a generality, I think the logic makes sense. Where that line is drawn may be different for each person, but that the line exists for some people I think is a reasonable statement.

    Personally, I'm a complete geek, and won't stop abusing the crap out of perl 5 until perl 6 is somewhat established. But I can understand how that may not be true (or even should not be true) for some people.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2022-08-18 05:45 GMT
Find Nodes?
    Voting Booth?

    No recent polls found