develooper Front page | perl.perl5.porters | Postings from April 2012

Re: proposal: functional C<if>

Thread Previous | Thread Next
From:
David Nicol
Date:
April 28, 2012 13:53
Subject:
Re: proposal: functional C<if>
Message ID:
CAFwScO-+p+YjC2OQDNfDwRVS_P8_69W5RP+L32zrq49YZ_WUrw@mail.gmail.com
On Sat, Apr 28, 2012 at 8:21 AM, Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
> For what it's worth I once asked Larry Wall on #perl6 if he'd consider
> making everything an expression in Perl 6, i.e. you could always stick
> an assignment in front of any block.
>
> He didn't like that for language design reasons, he thought that
> expressions and blocks should be distinct constructs.
>
> I think for Perl 5 it makes the most sense to just continue using do {}.

( expression )
could always be
do { expression }

could it not?


-- 
In this document, the key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
"SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
"OPTIONAL" are to be interpreted using situational ethics.

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