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

Re: Revisiting smart match

Thread Previous | Thread Next
Rocco Caputo
December 20, 2017 01:55
Re: Revisiting smart match
Message ID:
> On Dec 19, 2017, at 03:49, Konovalov, Vadim <> wrote:
> > From: Leon Timmermans
> > I think we're approaching this the wrong way.

I tossed around some ideas last night in IRC, but they were all flawed in one way or another.

Stepping back, I think most people are trying to fill this template:

"considering" SUBJECT {
  "if it's true that" CONDITION { ... }
  "if the thing being considered matches" MATCHER { ... }

  # and

  do { ... } "if it's true that" CONDITION;
  do { ... } "if the thing being considered matches" MATCHER;

Given the amount of effort that's been put into finding a succinct solution, maybe it's not possible in English.  It may be worth thinking about different templates entirely, or relaxing the "succinct" or "English" constraints.

As a language, English has no shame.  It won't mind if Perl ganks a few more words from elsewhere.

I don't recall seeing the problem expressed this way.  Sorry if it was and I missed it.  I hope someone finds this useful.

Rocco Caputo <>

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