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

Re: Revisiting smart match

Thread Previous | Thread Next
Eirik Berg Hanssen
December 19, 2017 13:51
Re: Revisiting smart match
Message ID:
On Tue, Dec 19, 2017 at 2:47 AM, 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.

  Yes.  It's a conjunction, expecting a clause, with a verb, not just a
noun phrase for matching.

  ... and that's a thought ... one preposition (with noun phrase, for
matching), and one conjunction (with clause, for truth-testing):

  upon ($baz) { do_stuff(); }
  do_stuff() upon $baz;

  when ($_->foo eq 'bar') { do_stuff(); }
  do_stuff() when $_->foo eq 'bar';

  ... or, you know, some of the other suggestions ...


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About