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

Re: Thinking of adding OP_WEAKEN

Thread Previous | Thread Next
Paul "LeoNerd" Evans
December 2, 2021 17:40
Re: Thinking of adding OP_WEAKEN
Message ID:
On Wed, 7 Jul 2021 09:46:08 +0100
"Paul \"LeoNerd\" Evans" <> 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, to copy other functions from from Scalar::Util)

Paul "LeoNerd" Evans      |  |

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