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

Re: disabling smartmatch and when()?

Thread Previous | Thread Next
Dave Mitchell
June 20, 2022 17:38
Re: disabling smartmatch and when()?
Message ID:
On Tue, Jun 21, 2022 at 01:18:17AM +0800, Tom Molesworth wrote:
> On Tue, 21 Jun 2022 at 00:58, Dave Mitchell <> wrote:
> > On Mon, Jun 20, 2022 at 05:54:52PM +0200, Tomasz Konojacki wrote:
> > > I can't count the times I had to explain to people outside of the p5p
> > > bubble that "experimental" in the case of smartmatch actually means
> > > "deprecated" and they shouldn't use it.
> >
> > Perhaps these people have no business being coders?
> >
> Perhaps this is not the best advert for Perl.

I stand by the fact that I find it bizarre that a coder would write
production code which, when they find that it triggers a mandatory warning
saying "this feature is experimental", that they are either so incurious
that they don't read the documentation which explains why this is
experimental (and the implications), or that they read it and still just
plough on and add the 'no warnings experimental' line to silence it.

> Other languages such as Python and Rust have added features such as
> pattern matching - in Perl, we're taking away even the current limited
> attempt at switch/case, and we don't have a replacement...

Other languages aren't down to having about 1.5 people who realistically
have both the knowledge, time and enthusiasm to add or change core
language features. Other such languages didn't have their chief language
designer leave 20 years ago, and still with no replacement in sight.

> ... oh, and now we're telling our users that they "have no business being
> coders", just because they had the temerity to follow previous advice such
> as
> ?

I wasn't aware of this. I will admit that it's particularly egregious that
this wasn't fixed until 5.30.0 - although in our defence, the FAQ isn't
maintained by the perl core developers.

"I used to be with it, but then they changed what ‘it’ was, and now what
I’m with isn’t it. And what’s ‘it’ seems weird and scary to me."
  -- Grandpa Simpson
(It will happen to you too.)

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