develooper Front page | perl.perl5.porters | Postings from November 2000

Re: IDEA: more for-like map and grep?

Thread Previous | Thread Next
From:
Simon Cozens
Date:
November 20, 2000 18:54
Subject:
Re: IDEA: more for-like map and grep?
Message ID:
20001121025411.B28976@pembro4.pmb.ox.ac.uk
On Mon, Nov 20, 2000 at 09:46:06PM -0500, Jeff Pinyan wrote:
> It doesn't work because ...
> is not an EXPR. 

Oh, I know *why* it isn't allowed, but it's still strangely odd.
There's nothing ambiguous about it - if Perl truly acted like
a natural language it would surely be able to work out what I meant.
(That's a dangerous path to tread, which is why I'm only discussing truly
unambiguous syntaces.)

>   do { $total += $_ for @array } if $computing_total;

Yes, but that completely defeats the point of doing the post-expression stuff.
:)

-- 
In this talk, I would like to speculate a little, on ... the development
of intelligent life. I shall take this to include the human race, even
though much of its behaviour throughout history has been pretty
stupid... - Stephen Hawking

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