develooper Front page | perl.perl5.porters | Postings from June 2022

Re: disabling smartmatch and when()?

Thread Previous | Thread Next
Dave Mitchell
June 20, 2022 14:43
Re: disabling smartmatch and when()?
Message ID:
On Mon, Jun 20, 2022 at 04:10:12PM +0200, Tomasz Konojacki wrote:
> I'm not sure what exactly you are proposing.
> If it's turning ~~ into an enabled by default feature flag (although
> disabled in the ":5.38" bundle) à la "indirect", then +1 from me.

I mean that smartmatch and when() are completely removed, cannot be
(re)enabled, and if used will always produce a compile-time error.

> If you actually want to remove it, then I'm *strongly* opposed. We can't
> remove smartmatch until we provide a replacement *and* it goes through a
> proper deprecation cycle (and by "proper" I mean much longer than the
> usual 2 release cycles).

It's gone through a 9 year deprecation cycle, with a mandatory
experimental warning that you have to explicitly disable.

Whether we remove it or change it, its going to break any existing code
which uses it.

> Smartmatch is *very* widely used in production code and we *completely* failed
> to communicate that it's on its way out.

We have been telling people not to use it for nearly a decade.

Music lesson: a symbiotic relationship whereby a pupil's embellishments
concerning the amount of practice performed since the last lesson are
rewarded with embellishments from the teacher concerning the pupil's
progress over the corresponding period.

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