Brent asked:

   > # Well, I'm not a Damian, but I play one on perl6-language. ;-)
   > 
   > Well, then, where's a *real* Damian?  :^)


The Real Damian is the Damian inside each of us. 
You need to get in touch with your *own* inner Damian.

;-)


   > I assume we're going to recycle 'my' and 'our' to be 'instance' and
   > 'class'--is that correct?

That's what I'm proposing.


   > Will that be lvalue or rw?  I could see it being rw, to keep the number
   > of intrinsic properties to a minimum, and since it's a nice analogy to
   > rw parameters.  (Plus we might want to reserve lvalue for more magical
   > lvalue tricks--sort of a poor man's tie().)

Still to be decided. Most folks I've talked to (and that's quite a few folks)
like C<is rw> for parameters, but loathe it for return values. We'll see.


   > What if we have an instance variable $foo and a global $foo, and we want
   > to access the global?

If it's a package variable, prefix it with it's package name
(actually, s/package/module/g in Perl 6, but I didn't want to confuse the
issue further)

If it's a true global, use $*foo (a la Apocalypse 2)

If it's an outer-scope lexical, use C<caller->{MY}> or else rebind it
before the class declaration:

        my $foo;

        $bar := $foo;
        class Whatever {
                my $foo;

                method baz {
                        return $foo            if $bar;
                        #        ^                  ^
                        #        |                  |
                        #   attribute $foo   outer lexical $foo
                }
        }


   > Are we still gonna be able to pick what we call the current instance?

I would hope so.

I favour the ability to write:

        method actor {
                my $me is invocant;
                ...
        }

   
   > All these Star Trek references are threatening to make my warp core
   > breach...  :^)

Too much information.

;-)

Damian

Reply via email to