Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: RFC: Is there more to alias? (perl6)

by tye (Sage)
on Aug 25, 2004 at 10:33 UTC ( [id://385688]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: RFC: Is there more to alias?
in thread RFC: Is there more to alias?

Heh, I wonder if I'm missing something, but it appears that Data::Alias's interface is better in several ways than Perl6's. How will Perl6 support the following tasks other than with these relatively ugly hacks:

$w = alias [$x, $y, $z]; # vs. $w[0] := $x; $w[1] := $y; $w[2] := $z; alias push @x, $y; # vs. push @x, 0; @x[-1] := $y; alias my( @x )= @y; # vs. @x= (); @x[$_] := @y[$_] for 0 .. @y.last; alias my( @x )= GetList(); # vs. is this possible with Perl6's syntax?

Perhaps Perl6 should have 'alias' built in along with the more succinct := operator?

- tye        

Replies are listed 'Best First'.
Re^3: RFC: Is there more to alias? (perl6)
by Aristotle (Chancellor) on Aug 25, 2004 at 11:34 UTC

    The following might work, and if so would cover several of the cases:

    push @x, my $x := $_ for @y;

    But that's still much clumsier than Data::Alias.

    I have a hunch though that in Perl6 we'll be using the splat to do this, something remotely looking like

    *@x := *@y;

    Don't ask me about the precise syntax though.

    Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://385688]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.