Dan Sugalski wrote: > > We aren't doing refcounting. We are continuing with the current > scheme as implemented. We're not looking to do anything to change > that scheme except perhaps implementing a generational or continuous > garbage collection system.
Last I checked Python used refcounting... How can we claim to support Python without refcounting? > Unless Larry mandates dead-on timely destruction for Perl 6, and he's > told me end of block or end of sub is fine so far, refcounting isn't > an option. I wandered across some C# docs that describe a method to both work with exception handling and insure timely destruction... Its nothing new. And it only garauntees the timely destruction at the end-of-block, not when last reference is released. But it is interesting to see how others do it. using ( type variable = initialization ) embedded statement which expands out to: { type variable = initialization; try { embeddedStatement } finally { if (variable != null) { ((IDisposable)variable).Dispose(); } } } So using 'using' requires that the variable/object in question implement an explicit 'Dispose' method and in use might look like: using (TextReader reader = new StreamReader(filename)) { string line; while ((line = reader.ReadLine()) != null) { Console.WriteLine(line); } } Or poorly perl6-ified: using $reader = IO.new($file) { print while $reader }; Couldn't parrot divorce itself from the timely destruction issue and punt that to the higher level languages? Require the HLL or programmer to call an explicit destructor, and have parrot's idea of timely destruction be limited to the HLL forcing garbage collection... -- Garrett Goebel IS Development Specialist ScriptPro Direct: 913.403.5261 5828 Reeds Road Main: 913.384.1008 Mission, KS 66202 Fax: 913.384.2180 www.scriptpro.com garrett at scriptpro dot com