develooper Front page | perl.perl5.porters | Postings from June 2021

Re: RFC 0004 - defer {} syntax

Thread Previous | Thread Next
From:
Andy Broad
Date:
June 17, 2021 12:02
Subject:
Re: RFC 0004 - defer {} syntax
Message ID:
51bf0940b43.577c4f76@mysmtp.broad.ology.org.uk
On 17/06/2021, Arne Johannessen wrote:

> Ben Bullock <benkasminbullock@gmail.com> wrote:
>> 
>> I can see an advantage from being able to run defers conditionally.

> consider:

>     defer if EXPR { ... }
> vs:
>     defer { ... if EXPR }

> The second form is already allowed by the syntax proposed in this RFC,
> so the benefit of also allowing the first form seems to be little.

This first reads to me as implying that if EXPR is evaluated at the point
where the defer statement occurs, whereas the second if EXPR is clearly
evalauted at "defer time" . 

Regards


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