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

Re: Perl feature wish: quote-word array-ref operator

Thread Previous | Thread Next
From:
Paul "LeoNerd" Evans
Date:
March 13, 2021 13:10
Subject:
Re: Perl feature wish: quote-word array-ref operator
Message ID:
20210313131006.568f8e6f@shy.leonerd.org.uk
On Fri, 12 Mar 2021 22:11:53 -0500
"Ricardo Signes" <perl.p5p@rjbs.manxome.org> wrote:

> Raku attacked this by putting its modifiers in the beginning.  If we
> could prepare to do this extensibly, even if only with core-provided
> extensions, and even with very few to start, we'd be in a good place.
> 
> This example is meant to make the point, not to be exactly what we
> want:
> 
> qz:d[ ... ]      # :d means "delimiter determines type" so this gets
> an arrayref qz:d{ ... }      #    ...same thing, but we get a hashref

Perhaps we could prepare for it by declaring as "discouraged" and
eventually deprecated, the use of : as a qq()-like delimiter?

While currently it is valid to

  print qq:Hello, world\n:;

I suspect in practice very few cases will come up that we -might-
consider it worthwhile to carve out that little space, similar to the
\{ in regexp.

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