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

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

Thread Previous | Thread Next
Aristotle Pagaltzis
August 22, 2013 16:57
Re: [perl #119189] Bleadperl v5.19.2-276-g38be3d0 breaksLEONT/Const-Fast-0.014.tar.gz
Message ID:
* Father Chrysostomos via RT <> [2013-08-22 17:40]:
> On Thu Aug 22 04:14:44 2013, nicholas wrote:
> > On Thu, Aug 22, 2013 at 12:57:22PM +0200, Leon Timmermans wrote:
> > > Scalar::Util comes to mind, even if it can be used on non-scalars.
> >
> > Possibly there ought to be a restriction to using it only on
> > scalars.
> That wouldn’t help Const::Fast, as the failures are precisely due to
> a change in the way SvREADONLY(@a,1) works, for the sake of

I don’t think that changes Nicholas’ point, not at all really.

If that is what Const::Fast requires then there needs to be a function
in… well unfortunately we have no corresponding Array::Util, but maybe
it is time for such.


> Yeah, this whole area is a case in which people poke at the internals,
> see what happens, go ‘Oh, neat!’, and then start writing tests and
> depending on transient behaviour.

… 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.

Aristotle Pagaltzis // <>

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