Larry Wall larry-at-wall.org |Perl 6| wrote:
OK, that that might be what was meant in the synopses when it was penned
9 years ago, before formal terminology was better fixed.
Basically, (ignoring STD's definition of name) I view @a as a
name, in the sense of identifying a unique object. It just happens
to contain navigational elements like a URL.
One of my thoughts, exactly.
Of course, if @a is declared to hold only a compact array of native
types, binding a pointer into one of the entries isn't going to fly.
And if $x is the wrong type, it errors. So if @a is the "wrong type" in
a larger sense of not being able to support that, it errors. E.g. it is
a compact array, or some user-defined collection, or is otherwise read-only.
But we're defining the differences between the behavior of $a and @a in
terms of how it desugars in context, so there's no need for the actual
binding to distinguish any extra levels of indirection. All it needs
to know is where to poke the pointer to the object. And normally @a
contains a list of poke-able pointers, so @a := $x is fair game.