Re: confold

[email protected] (Josh Juran)
Newsgroups perl.perl5.porters
Message-ID <[email protected]>
On Jan 30, 2026, at 3:38 PM, lnation <[email protected]> wrote:

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

Once the compile-time constant folding has been implemented, why not just have it always on instead of having to opt in?

Cheers,
Josh
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.