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

Re: Revisiting smart match

Thread Previous | Thread Next
From:
Tomasz Konojacki
Date:
December 17, 2017 22:18
Subject:
Re: Revisiting smart match
Message ID:
20171217231204.37F6.5C4F47F8@xenu.pl

On Sun, 17 Dec 2017 14:39:28 -0500
Ricardo Signes <perl.p5p@rjbs.manxome.org> wrote:

> 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.
> 
> -- 
> rjbs

+1, 'if' makes the distinction *much* more obvious.

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