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

Re: Revisiting smart match

Thread Previous | Thread Next
Karen Etheridge
December 19, 2017 03:07
Re: Revisiting smart match
Message ID:
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 <> 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About