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

Re: 1 until defined(getvalue()); return $^d;

Thread Previous | Thread Next
From:
Michael G Schwern
Date:
June 7, 2001 03:39
Subject:
Re: 1 until defined(getvalue()); return $^d;
Message ID:
20010607113939.N684@blackrider.blackstar.co.uk
On Wed, Jun 06, 2001 at 02:20:25PM -0500, David L. Nicol wrote:
> Since this thread made it into this week's Official Perl6 Summary,
> here goes a defense of C<it> as a shorthand for the thing that last
> had C<defined> or C<exists> queried of it.

Ya know, I hate myself to admit it but I'm liking this idea.  The one
that got me was this:

        foreach my $uid (@users) {
            print it if is_luser($uid);
        }

I like the way it reads.  If 'it' is read-only it limits the potential
complications.  Yes, you can do similar things with grep...

        print grep is_luser($_), @users;

but TMTOWTDI.

I am a bit worried about having to do so much pointer copying to
support this feature.


PS  'it' could take many forms

-- 

Michael G. Schwern   <schwern@pobox.com>    http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <perl-qa@perl.org>	     Kwalitee Is Job One
Monkey tennis

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