Message from discussion
Properties & Methods
Newsgroups: perl.perl6.language
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.perl.org
Return-Path: <ahast...@worldnet.att.net>
Mailing-List: contact perl6-language-h...@perl.org; run by ezmlm
Delivered-To: mailing list perl6-langu...@perl.org
Delivered-To: moderator for perl6-langu...@perl.org
Delivered-To: perl6-langu...@perl.org
Reply-To: <Austin_Hasti...@Yahoo.com>
To: "Luke Palmer" <fibon...@babylonia.flatirons.org>, <Austin_Hasti...@Yahoo.com>
Cc: <perl6-langu...@perl.org>
Subject: RE: Properties & Methods
Date: Tue, 8 Apr 2003 21:31:52 -0500
Message-ID: <ICELKKFHGNOHCNCCCBKFKEJDCDAA.ahasting@worldnet.att.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
In-Reply-To: <ygc1y0cshe8.fsf@babylonia.flatirons.org>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
X-SMTPD: qpsmtpd/0.25, http://develooper.com/code/qpsmtpd/
X-Spam-Check-By: one.develooper.com
X-Spam-Status: No, hits=-0.5 required=7.0 tests=CARRIAGE_RETURNS,IN_REP_TO,QUOTED_EMAIL_TEXT,SPAM_PHRASE_00_01,USER_AGENT_OUTLOOK version=2.44
X-SMTPD: qpsmtpd/0.25, http://develooper.com/code/qpsmtpd/
Approved: n...@nntp.perl.org
From: ahast...@worldnet.att.net (Austin Hastings)
References: <ygc1y0cshe8.fsf@babylonia.flatirons.org>
Lines: 49
> -----Original Message-----
> From: Luke Palmer [mailto:fibon...@babylonia.flatirons.org]
> Sent: Tuesday, April 08, 2003 6:23 PM
> To: Austin_Hasti...@Yahoo.com
> Cc: perl6-langu...@perl.org
> Subject: Re: Properties & Methods
>
>
> > What about closures? If I enclose a property, that property
> won't die. Do we
> > want that? (Case in specific point: your breadth-first-traverse routine
> > earlier would suddenly acquire a funny bug if the code in
> question enclosed
> > one or more of the nodes while they were tagged as C<visited>, no?)
>
> Um, no. That's the whole point of lexically scoped properties. Every
> time I do
>
> my $visited = new Property;
>
> I'm making, as it says, a C<new>, distinct property. It may be that I
> don't understand where the bug is. Could you explain and exemplify a
> bit more?
You may be making a new property, but how does it access?
die "already visited this node" if $root.visited;
Which visited? The "old" visited is still alive, no? So it's still sitting
in the "visited slot" on this node.
Unless the .visited has to check id's, in which case this thread joins with
MikeL's =:= superthread... :-)
>
> > Conversely, enclosing lexical properties might have interesting
> behavior,
> > much the way that enclosing lexical variables does. But making lexical
> > properties a "risk" because of the closure behavior means that they're
> > suddenly prohibited in cases like your example.
>
> Again, I don't understand.
This rides on the point above.
=Austin