develooper Front page | perl.perl5.porters | Postings from December 2017

Re: Revisiting smart match

Thread Previous | Thread Next
From:
Karen Etheridge
Date:
December 19, 2017 03:07
Subject:
Re: Revisiting smart match
Message ID:
CAPJsHfCL74+QK1V3Om1uwECMy1miFBtnc35Dcq-dXwrHWvO4gw@mail.gmail.com
I'm sure I missed some critical earlier part of the conversation that would
make my questions horribly ignorant -- but I've read the perldelta updates
about smartmatch changes and the new whereis and whereso keywords and I
have two questions:

- why is there a need for two words? surely ` somekeyword ($x ~~ $y)` and
`somekeyword ($z)` can be implemented using the same token?
- why is this word simply not 'where'? Smartmatch is already experiencing
breaking changes in this release (where ~~ *has* to be implemented as an
overload sub now on the RHS), so why can't 'when' simply be repurposed here?



On Mon, Dec 18, 2017 at 5:47 PM, Zefram <zefram@fysh.org> wrote:

> Craig A. Berry wrote:
> >whereas($input) {
>
> That's poor.  Per English meaning, the operand of "whereas" should be
> a condition, not a value, so it's totally unsuitable for this role.
>
> >        whenever ($_ eq "string") { die "A" }
>
> "whenever" has unhelpful temporal connotations.
>
> >        whenas ($matcher)      { die "C" }
>
> This doesn't read naturally.
>
> -zefram
>

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