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

Re: Revisiting smart match

Thread Previous | Thread Next
From:
Leon Timmermans
Date:
December 18, 2017 21:04
Subject:
Re: Revisiting smart match
Message ID:
CAHhgV8hLTBZwtYHNuCQxVU+XwdjW7br0WSfz40QWUrHryybdoA@mail.gmail.com
On Sun, Dec 17, 2017 at 8:39 PM, Ricardo Signes <perl.p5p@rjbs.manxome.org>
wrote:

> * Zefram <zefram@fysh.org> [2017-12-05T19:20:49]
> > I wrote:
> > >I have not yet introduced a short syntax for "when" with smartmatch,
> > >nor renamed "when".
> >
> > I have now done these, on the zefram/dumb_match branch.  The version of
> > "when" that uses its argument as a truth value is now called "whereso",
> > and the version that smartmatches is called "whereis".
> > [...]
> > The "so" and "is" particles make it pretty obvious which has which
> semantics.
>
> I realize it has been nearly two weeks since this post, and I won't push
> the
> issue, but I object to these names.  In particular, I find that last quoted
> sentence impossible to agree with.
>
> This is going to lead to confusion for learners, and native English
> speaking
> won't be the issue.  The issue will be that the two terms have no real
> clear
> distinction.
>
> The semantics are now so much better that having such unclear keywords
> would be
> a shame.  I suggest something that includes "if" or "true" for the if-like
> form, and/or something that includes "match" for the matching form.
>
>   ifcase  (...) { ... }
>   caseif  (...) { ... }
>   whenif  (...) { ... }
>   case if ( ... ) { ... }
>
>   case    (...) { ... }
>   when    (...) { ... }
>   casematch (...) { ... }
>   testcase  (...) { ... }
>   case when (...) { ... }
>
> That's the last I'll post on this unsolicited.
>

I think we're approaching this the wrong way.

I don't think p5p currently has anyone with the kind of language design
skills that is required to make this sort of change (I don't consider
myself any different from anyone else here in that regard). In that light
it seems baffling to me that we are trying to solve this inside our tiny
little echo chamber.

I'm not sure what the solution is exactly, but I'm pretty sure it will
involve broader community involvement.

Leon

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