in reply to Reference in Perl 6
In fact, nearly everything is a referece.
# $x is a reference my $x = SomeClass.new(); # this also doesn't need an explicit reference my @a = 1, 2, 3; my $arr = @a; # now you can use $arr instead of @a, though $arr won't flatten into l +ists by default $arr.push('foo') say ~$arr; # 1 2 3 foo
So references aren't gone; just their visibility has decreased drastically, as well as the need for explicit derferencing.
Also function arguments are passed by read-only reference by default.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reference in Perl 6
by Anonymous Monk on Aug 19, 2010 at 20:41 UTC | |
by moritz (Cardinal) on Aug 20, 2010 at 07:01 UTC | |
by Anonymous Monk on Aug 20, 2010 at 13:29 UTC | |
by moritz (Cardinal) on Aug 20, 2010 at 13:45 UTC | |
by Anonymous Monk on Aug 20, 2010 at 14:23 UTC | |
| |
by Anonymous Monk on Aug 20, 2010 at 11:00 UTC | |
by chromatic (Archbishop) on Aug 20, 2010 at 16:23 UTC |