develooper Front page | perl.perl6.language | Postings from January 2002

Re: Does this mean we get Ruby/CLU-style iterators?

Thread Previous | Thread Next
From:
Michael G Schwern
Date:
January 19, 2002 02:22
Subject:
Re: Does this mean we get Ruby/CLU-style iterators?
Message ID:
20020119102155.GK19498@blackrider
On Fri, Jan 18, 2002 at 08:03:41PM -0800, Larry Wall wrote:
> : allow this:
> : 
> :     File.foreach('/usr/dict/words') { print }
> 
>     File.foreach('/usr/dict/words', { print })
> 
> or even (presuming the prototype is available for parsing):
> 
>     File.foreach '/usr/dict/words' { print }

Now I'm a little confused.  The apoc talked about writing your own
while loop.  A while loop looks like:

    while($something) { do_this }

and a custom while loop would have to be

    mywhile($something) { do_this }

and it doesn't seem much of a stretch for

    Class.method($something) { do_this }

or is that what you ment by "ignoring parser issues"?


-- 

Michael G. Schwern   <schwern@pobox.com>    http://www.pobox.com/~schwern/
Perl Quality Assurance	    <perl-qa@perl.org>	       Kwalitee Is Job One
Death was thought to be fatal.
	-- Craig A. Berry in <a05101002b8165afc6b62@[172.16.52.1]>

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About