confold

[email protected] (lnation)
Newsgroups perl.perl5.porters
Message-ID <[email protected]>
Hi all,

I’ve just made my first merge request into core, I would like to introduce a new operator <: (confold) - a prefix operator for compile-time constants.

The Problem:

Even literal string have runtime overhead.

   my $name = “string value”; # StIl executes ops at runtime

The Solution:

Add an operator so I can ensure folding at compile time. 

  my $name = <: “string value”; # Folded away - zero runtime ops.

Regards,

Robert.

https://github.com/Perl/perl5/pull/24145
confold by ThisUsedToBeAnEmail · Pull Request #24145 · Perl/perl5
github.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.