develooper Front page | perl.perl5.porters | Postings from April 2021

Re: on changing perl's behavior

Thread Previous | Thread Next
From:
Dan Book
Date:
April 4, 2021 21:58
Subject:
Re: on changing perl's behavior
Message ID:
CABMkAVVDL++B39HGTqaOUgO_4j0L3AyoFPcVyga=fv7DxqUEXA@mail.gmail.com
On Sat, Apr 3, 2021 at 11:08 PM Ricardo Signes <perl.p5p@rjbs.manxome.org>
wrote:

>
> "users don't want to use vX because they don't know what it does"
>

This seems like a non-concern to me unless there is evidence people
commonly make this decision - in my experience, it's more often
specifically because "use warnings" is not included. People use Mojo::Base
with no qualms, even if they may not know everything it does (it does a
lot, and what it does is well documented), but because they want its
benefits. Major versions give us a platform to list out the benefits of
such a declaration in an easily referenced manner.


> "users don't want to add use vX to old code [for the same reason]"
>

This is a different concern, and in my opinion a good one. We cannot
provide both a good environment for new code and a good environment for
existing unreviewed code at the same time. We must choose.


> "I want to know that all my code follows the same rules out of the gate
> without chasing up any set of use statements everywhere."
>

Better to have use statements declare such rules than have them invisibly
applied by the environment.


> And built into *that* is the question of "my code".  Is that "all the
> code we run" or "all the code we run *that we wrote*."
>

Lexical declarations make this distinction trivial.


>
> *Anyway:*  I'm not going to address all of that now and act like I have
> an answer that will please everyone.  I do think it's at least a bunch of
> the "new defaults" argument broken down into pieces.
>
> My question is more like this:  We assume that "just start all code with
> use vX" is workable for new code.  What can we do to encourage users to
> feel good about how they take their existing, running code and get it up
> closer to "the best perl we know" options?  Here, I'm assuming that there's
> a lower cost of ownership to your code if you can know that all your code
> can be skimmed the same way, because it's got the same set of options.  But
> you now want to take your older code and stick the same use vX at the top
> as you have in your new code.  How do we help users feel confident in
> staying up to date with the "use vX" of their current perl-X?
>

Provide guidance and good documentation, publicize the new bundle well, and
accept that some code is better off without it.

-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