develooper Front page | perl.perl6.language | Postings from May 2001

Re: Apoc2 - <STDIN> concerns

From:
Dan Sugalski
Date:
May 8, 2001 14:09
Subject:
Re: Apoc2 - <STDIN> concerns
Message ID:
5.1.0.14.0.20010508170739.02187060@24.8.96.48
At 09:42 PM 5/8/2001 +0100, Simon Cozens wrote:
>On Tue, May 08, 2001 at 12:58:24PM -0700, Larry Wall wrote:
> > Perhaps Perl 6 will have ordinary blocks that can function as continuations
> > to the surrounding list context.
>
>OK, now you've broken my brain. Can you give me an example that is i) useful
>and ii) reasonably obvious to the untrained eye? If not, I humbly suggest it
>has little business being in the "blue-collar language" we call Perl.

   @foo = ({scalar each %some_tied_hash});

with the function being called only when you access a particular element? 
(Presumably calling it for elements 0-9 and caching them if the first 
element you access is 10)

					Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk




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