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

Re: Revisiting smart match

Thread Previous | Thread Next
From:
Dan Book
Date:
November 28, 2017 00:12
Subject:
Re: Revisiting smart match
Message ID:
CABMkAVXmY90x50NL0maaqrrtixvCBUJ--DkxNuzXWrtJP3pEQQ@mail.gmail.com
On Mon, Nov 27, 2017 at 6:56 PM, Zefram <zefram@fysh.org> wrote:
>
>
> Making the implicit jump a "next" seems sensible.  I'm dubious about
> having a "break" keyword as a synonym of "next", because it would increase
> the confusion that arises when comparing the loop control keywords to C.
> C's "break" is (when applied to loops) our "last", so to have a "break"
> that behaves like C's "continue" seems like it's asking for trouble.
> How would you feel about having no "break" keyword at all, and just using
> "next" or "last" to get out of a "given"?
>

Personally this seems sensible and consistent, I've always wondered why a
new keyword needed to be added for this.

Separate keywords for boolean expressions and matchers makes a lot of
sense, but the hard part is the naming.

-Dan

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