Message from discussion
Properties & Methods
Newsgroups: perl.perl6.language
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.perl.org
Return-Path: <fibon...@babylonia.flatirons.org>
Mailing-List: contact perl6-language-h...@perl.org; run by ezmlm
Delivered-To: mailing list perl6-langu...@perl.org
Delivered-To: perl6-langu...@perl.org
References: <ICELKKFHGNOHCNCCCBKFEEJBCDAA.ahasting@worldnet.att.net>
Cc: perl6-langu...@perl.org
In-Reply-To: <ICELKKFHGNOHCNCCCBKFEEJBCDAA.ahasting@worldnet.att.net>
To: Austin_Hasti...@Yahoo.com
Subject: Re: Properties & Methods
Date: 08 Apr 2003 17:23:27 -0600
Message-ID: <ygc1y0cshe8.fsf@babylonia.flatirons.org>
Lines: 22
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-SMTPD: qpsmtpd/0.25, http://develooper.com/code/qpsmtpd/
X-Spam-Check-By: one.develooper.com
X-Spam-Status: No, hits=-1.0 required=7.0 tests=CARRIAGE_RETURNS,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01 version=2.44
X-SMTPD: qpsmtpd/0.25, http://develooper.com/code/qpsmtpd/
Approved: n...@nntp.perl.org
From: fibon...@babylonia.flatirons.org (Luke Palmer)
> 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?
> 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.
Luke