In a sense the term "anonymous" is irrelevent when you are dealing with a reference to an object.
In a practical sense maybe, but I think it draws a very important distinction. Even in practice, it is at least somewhat helpful¹.
From an instructional perspective, I think it is useful to explain the difference between
. . . and . . .my $r1 = [ { foo => 'baz', bar => 'qux' } ];
my %h = ( foo => 'baz', bar => 'qux' ); my $r2 = [ \%h ];
I think it is especially useful when you are speaking of an initialization and an anonymous composer because, at that point, you know all of the references to the anonymous data are accounted for. Even in the general case though, saying out loud, "a reference to an anonymous array containing a reference to an anonymous hash" is giving more information than saying "a reference to an anonymous array containing a reference to a hash." The latter makes me want to ask, "which hash?"
Fixed: Missing closing brace in first bit o' code. Thanks zby.
Fixed: Yes, I meant %h. Thanks demerphq.
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Re: Re: •Re: On Declaration
by sauoq
in thread On Declaration
by demerphq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |