On Thu, Nov 27, 2003 at 08:08:05PM -0800, Paul Hodges wrote:
: 
: --- Larry Wall <[EMAIL PROTECTED]> wrote:
: > ... in fact, we may be limiting the creation of properties
: > to predeclared names, so that even
: > 
: >     return 0 but ture;
: > 
: > can be caught at compile time.
: 
: Excellent, so long as we can define new properties explicitly.
: At the moment, I draw a complete blank on how to do that.
: 
: Somebody drop me an example?

Well, it hasn't been defined yet.  Likely there will be some syntax

    my property foo;

that is shorthand for something vaguely resembling

    my role foo is property {
        has $.foo is rw;
    }

However, universal properties like "true" and "tainted" are likely to
be declared implicitly everywhere:

    property *true;
    property *tainted;

Less common properties are likely to be imported into a lexical scope.
So you'd likely only declare properties that you use entirely by
yourself, or that you intend to export.  If you really want to mess
everyone up, though, you could certainly declare things like:

    property *ture;

Actually, there's something to be said for declaring all property names
as globals, since they cut across object classes, and you wouldn't want
to add two different properties of the same name to a given object.
Or maybe we can tag property names with the scope in which they're
declared somehow.

Larry

Reply via email to