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

Re: Thinking of adding OP_WEAKEN

Thread Previous | Thread Next
From:
Paul "LeoNerd" Evans
Date:
December 2, 2021 17:40
Subject:
Re: Thinking of adding OP_WEAKEN
Message ID:
20211202174026.6a4aeffc@shy.leonerd.org.uk
On Wed, 7 Jul 2021 09:46:08 +0100
"Paul \"LeoNerd\" Evans" <leonerd@leonerd.org.uk> wrote:

> I'm wondering about adding a real one to core perl.
> 
> While there isn't a core `weaken()` operator, it would still be useful
> for 3rd party modules like Object::Pad. I'd also like to use it in
> Scalar::Util, by installing an entersub checker around
> Scalar::Util::weaken() to convert calls to that into that opcode
> directly for performance.

Coming back to reply to this: As part of the `builtin::` work
(RFC 0009) I will now indeed be adding one of these, accessible by the
builtin::weaken() function; so the previous comments about it not being
perl-accessible or testable are now sorted by that.

(Also, OP_ISWEAK, et.al. to copy other functions from from Scalar::Util)

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk      |  https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/  |  https://www.tindie.com/stores/leonerd/

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