You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reference as well as Dereferencing need to be completely rewritten as they suggest ridiculous, superfluous operations.
The section needs to say that we don't have references like in Perl 5 at all. While objects get "passed by reference" we don't even use that term when talking about regular code.
The current doc recommend use of things like say keys %($hashref ); or that you need an item() call to store an array in a scalar variable; or that you need a Zen slice to store a $hash in a %hash. All of that is superfluous and not needed.
Moreover, the major utility of references in Perl 5 is to pass around structured data without it being flattened. This is no longer needed in Perl 6, but the sections don't mention that fact at all.
If I'm coming from Perl 5, what I'd learn from those sections is I need to switch -> to . and @{} to @(), when in reality the entire paradigm is different in Perl 6.
The text was updated successfully, but these errors were encountered:
coke
changed the title
"References"/"Dereferncing" in 5-to-6 need to be rewritten
"References"/"Dereferencing" in 5-to-6 need to be rewritten
Dec 28, 2016
The reference as well as Dereferencing need to be completely rewritten as they suggest ridiculous, superfluous operations.
The section needs to say that we don't have references like in Perl 5 at all. While objects get "passed by reference" we don't even use that term when talking about regular code.
The current doc recommend use of things like
say keys %($hashref );
or that you need anitem()
call to store an array in a scalar variable; or that you need a Zen slice to store a$hash
in a%hash
. All of that is superfluous and not needed.Moreover, the major utility of references in Perl 5 is to pass around structured data without it being flattened. This is no longer needed in Perl 6, but the sections don't mention that fact at all.
If I'm coming from Perl 5, what I'd learn from those sections is I need to switch
->
to.
and@{}
to@()
, when in reality the entire paradigm is different in Perl 6.The text was updated successfully, but these errors were encountered: