develooper Front page | perl.perl5.porters | Postings from September 2013

Re: [perl #119189] Bleadperl v5.19.2-276-g38be3d0 breaks LEONT/Const-Fast-0.014.tar.gz

Thread Previous | Thread Next
From:
David Golden
Date:
September 20, 2013 20:02
Subject:
Re: [perl #119189] Bleadperl v5.19.2-276-g38be3d0 breaks LEONT/Const-Fast-0.014.tar.gz
Message ID:
CAOeq1c_1aOoi1SkFOvnNmiBqu_sXdPCPLNrYipfjZ=L_wSm_AQ@mail.gmail.com
On Wed, Aug 7, 2013 at 3:53 AM, Father Chrysostomos via RT
<perlbug-followup@perl.org> wrote:
> Oh no!
>
> These two modules are using Internals:: functions, so it is officially
> ‘their fault’.
>
> To work around this, I would have to add *more* Internals:: functions
> for constant.pm to use.  I hope I don’t have to do that.

I don't think constant.pm should have any priviledged status with
respect to Internals.  If it can use Internals, then Internals is not
really Internal.

I agree with Aristotle when he said this:

> … the only hope of ever getting out from under that mess is by offering
> API based on semantics, not implementation, i.e. these functions should
> be documented not as “sets the read-only flag” but as “makes the scalar
> read-only”, and then likewise “makes the hash restricted” etc, and they
> should do everything it takes to achieve whatever the docs say they do.
>
> The point is that each such function should be named and documented
> after the end it achieves, not the means it uses to provide it, which
> should be of no concern or business to its user. Only that way will
> there ever be any hope of reducing the level of intimacy of CPAN with
> perl’s insides to some appropriate level.

Frankly, I'd be pretty happen to have a "set_readonly" added to
Scalar::Util (or mauve).  99% of the time I want a read-only it's a
scalar, anyway.  If the semantics don't work well for arrays and
hashes, then let's not bother.

David

-- 
David Golden <xdg@xdg.me>
Take back your inbox! → http://www.bunchmail.com/
Twitter/IRC: @xdg

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