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

Re: Revisiting smart match

Thread Previous | Thread Next
Dan Book
November 28, 2017 00:12
Re: Revisiting smart match
Message ID:
On Mon, Nov 27, 2017 at 6:56 PM, Zefram <> 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.


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