[larry@wall.org: Re: grep/map in void context]

Leon Brocard leon at netcraft.com
Tue Nov 2 05:38:43 CST 1999


A suitably silly message from Larry Wall on perl5-porters
to announce (well, accompany really) the Bath Perl Mongers
meeting on Wednesday. Be there or be un-perled ;-)

Leon

----- Forwarded message from Larry Wall <larry at wall.org> -----

Date: Mon, 1 Nov 1999 15:46:45 -0800 (PST)
From: Larry Wall <larry at wall.org>
To: hv at crypt0.demon.co.uk
Cc: Larry Wall <larry at wall.org>, Simon Cozens <simon at brecon.co.uk>,
        perl5-porters at perl.org
Subject: Re: grep/map in void context 

hv at crypt0.demon.co.uk writes:
: Isn't the point that (void)'grep EXPR, LIST' is now better written as
: 'EXPR for LIST'? Or am I misunderstanding your point here?

It really doesn't bother me if people want to use grep or map in a void
context.  It didn't bother me before there was a for modifier, and
now that there is one, it still doesn't bother me.  I'm just not very
easy to bother.

The argument against using an operator for other than its primary
purpose strikes me the same as the old argument that you shouldn't have
sex for other than procreational purposes.  Sometimes side effects
are more enjoyable than the originally intended effect.

That being said, I'd never grep someone in a void context myself.

Larry

----- End forwarded message -----

-- 
Leon Brocard................................http://bath.pm.org/
leon at netcraft.com........................http://www.astray.com/

... These are not the droids you're looking for



More information about the Bath-pm mailing list