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

Re: smartmatch/switch deprecation for 5.28

Thread Previous | Thread Next
From:
Leon Timmermans
Date:
December 30, 2017 14:49
Subject:
Re: smartmatch/switch deprecation for 5.28
Message ID:
CAHhgV8hPghybe-F+iZB3GdFcqKs4qB3Uc3EzgKVuwG6RsErBvg@mail.gmail.com
On Fri, Dec 29, 2017 at 8:36 PM, Zefram <zefram@fysh.org> wrote:
> With smartmatch changes now reverted for 5.28, we need to decide
> pretty soon whether, and in which parts, smartmatch and switch should be
> deprecated in 5.28.  We're going to need some kind of deprecation process
> to move forward with developing smartmatch, and there's obvious benefit
> in starting that process as early as possible.  Of course, there's also
> danger in being hasty about the decision of what to deprecate.
>
> Opening position: I reckon that in the changes recently reverted we've
> got a pretty solid idea of what changes to smartmatch we actually want,

I don't think we do. Or better said we have many ideas with different
goals. It would help to first settle on a goal.

> and so we're in a position to deprecate immediately with that end in mind.
> We should not deprecate the entirety of smartmatch, but should deprecate
> all aspects of smartmatch and switch that are inconsistent with the
> prospective new behaviour.  Handily, the choice of whereis/whereso
> keywords doesn't affect what needs to be deprecated, so we don't need
> to wait for us to find the right keywords.
>
> First cut of a list of things that would be deprecated:
>
> * smartmatch operation without a smartmatch-overloading object ref on
>   the rhs
>
> * implicit enreferencement of argument expressions for ~~ and "given"
>
> * any use of "when", "default", or "break"
>
> * "next" et al skipping over a "given" block

Why would our end-users want that? What do these deprecations give
them that makes it worth the breakage?

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