On Thu, May 28, 2009 at 01:06:18PM -0300, Daniel Ruoso wrote:
: Em Qui, 2009-05-28 às 09:27 -0500, John M. Dlugosz escreveu:
: > Daniel Ruoso daniel-at-ruoso.com |Perl 6| wrote:
: > > Em Qui, 2009-05-28 às 00:24 -0500, John M. Dlugosz escreveu:
: > >> Please see <http://www.dlugosz.com/Perl6/web/info-model-1.html>
: > >> and talk to me about it.
: > > The illustratino is cool, but it doesn't take into account the
: > > possibility of:
: > >  @a[0] := $x;
: > Where in the synopses does it say anything like that is possible?  := is 
: > applied to a _name_.
: 
: I don't recall if it is in the synopsis... but it is a general
: expectation, and, I think, this was discussed in IRC for a long time.
: But certainly is a good time to either put on the spec or drop the
: expectation...

It pretty much has to be that way, if we want to represent lexical
pads with built-in data types.  Our symbol tables are simply hashes,
for instance.  (There may be many pads corresponding to a given
lexical symbol table, however, since all clones of a closure share
a single symbol table but each have their own pad of values.)

Basically, (ignoring STD's definition of name) I view @a[0] as a
name, in the sense of identifying a unique object.  It just happens
to contain navigational elements like a URL.

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.

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[0] := $x is fair game.

Larry

Reply via email to