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

Re: Elevator pitch - "assuming"

Thread Previous | Thread Next
From:
Paul "LeoNerd" Evans
Date:
October 16, 2021 15:04
Subject:
Re: Elevator pitch - "assuming"
Message ID:
20211016160406.18a5623c@shy.leonerd.org.uk
On Wed, 28 Jul 2021 12:52:25 +0100
"Paul \"LeoNerd\" Evans" <leonerd@leonerd.org.uk> wrote:

> Oh well if you wanted it as a block with the keyword first, that's
> easily possible as a keyword module:
> 
>   assuming( $value ) {
>     $_ = calculate_new_value_using $_;
>   }

Veesh: As a way to progress this idea, perhaps you would consider this
plan?

If you make it as a keyword in that form, you don't immediately get the
infix notation but you would at least be able to experiment with the
idea in its block form as a regular CPAN module.

In addition it would probably be possible to do as an infix version as
well with my PL_infix_plugin branch, though that won't help "regular"
perl builds. :)

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk      |  https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/  |  https://www.tindie.com/stores/leonerd/

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