ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl6-language
perl6-language
Re: Custom iterators
by Piers Cawley other posts by this author
Sep 25 2001 7:39AM messages near this date
Custom iterators | Re: Custom iterators
Michael G Schwern <schwern@[...].com>  writes:

[ A description of the Ruby 'block' syntax ]

Note too that, adopting the block syntax would let you do:

    File.new($filename) { ... }

Which doesn't look like much, but new could be implemented in such a
way that, if called with a block, the constructor would simply iterate
over the file and then explicitly close the file. Given the GC issues
of immediate finalization being hard to do (albeit possible), using
constructs that don't need it would surely be a Good Thing.

-- 
Piers Cawley
www.iterative-software.com


Thread:
Michael G Schwern
Piers Cawley
Michael G Schwern
Bart Lateur
Michael G Schwern
Bart Lateur
Michael G Schwern
Uri Guttman
Michael G Schwern
Brent Dax
Bryan C. Warnock
Michael G Schwern

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved