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

Re: [perl #127640] RFE: "qqw( $var/x $var/y word3 $var4=word4 )"

Thread Previous | Thread Next
From:
Abigail
Date:
March 23, 2016 21:05
Subject:
Re: [perl #127640] RFE: "qqw( $var/x $var/y word3 $var4=word4 )"
Message ID:
20160323210612.GC11328@almanda.fritz.box
On Wed, Mar 23, 2016 at 09:22:08PM +0100, Aristotle Pagaltzis wrote:
> * Abigail <abigail@abigail.be> [2016-03-23 18:50]:
> > On Thu, Mar 10, 2016 at 07:00:53PM -0500, Ricardo Signes wrote:
> > > * Aristotle Pagaltzis <pagaltzis@gmx.de> [2016-03-05T16:59:38]
> > > > > On Sat Mar 05 10:14:48 2016, perl.p5p@rjbs.manxome.org wrote:
> > > > > > $x = "good job";
> > > > > > @y = qqw( $x hunter );
> > > > > >
> > > > > > Is @y now ('good', 'job', 'hunter') or ('good job', 'hunter')?
> > > > > > I would think the latter.
> > > > >
> > > > I prefer the [latter].
> > >
> > > Me, too.
> >
> > Do we have to make a choice? If someone is going through the trouble
> > of implementing qqw() (or something similar named), why not introduce
> > two constructs, one for each option? Then the user can use whatever
> > he/she needs.
> 
> IMO the other option already has an existing construct:
> 
>     split ' ', qq( ... )
> 
> Do you consider that not good enough for some reason?


First of all, I don't have a strong need for qqw, regardless of what
meaning is given to it. But I can see some value in either of the
discussed meanings. I just want to point out there's also the possibility
to add more than one construct.

As for the "but here's a way to do it" argument, I don't find that a
very convincing argument.

qw can be expressed as

      split ' ', q (...)

but does that mean qw() is a waste?

Also, the variant you favour can also be easily expressed otherwise:

    @y = ($x, "hunter");

so that would argue to not implement qqw at all.


Nor 99% of the other features which are being proposed.



Abigail



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