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

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

Thread Previous | Thread Next
Paul "LeoNerd" Evans
March 13, 2021 13:10
Re: Perl feature wish: quote-word array-ref operator
Message ID:
On Fri, 12 Mar 2021 22:11:53 -0500
"Ricardo Signes" <> 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      |  |

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