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

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

Thread Previous | Thread Next
From:
H.Merijn Brand
Date:
March 13, 2021 17:38
Subject:
Re: Perl feature wish: quote-word array-ref operator
Message ID:
20210313183744.58c37b5f@pc09.procura.nl
On Sat, 13 Mar 2021 13:10:06 +0000, "Paul \"LeoNerd\" Evans"
<leonerd@leonerd.org.uk> wrote:

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

I've seen both : and ! used a lot in regex delimiters
I'm sure I used ':' myself a lot too in the early perl4-perl5
transition period, but probably only with m// and s///

-- 
H.Merijn Brand  https://tux.nl   Perl Monger   http://amsterdam.pm.org/
using perl5.00307 .. 5.33        porting perl5 on HP-UX, AIX, and Linux
https://tux.nl/email.html http://qa.perl.org https://www.test-smoke.org
                           

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