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

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

Thread Previous | Thread Next
Felipe Gasper
March 10, 2021 01:34
Re: Perl feature wish: quote-word array-ref operator
Message ID:

> On Mar 7, 2021, at 3:16 AM, Smylers <> wrote:

> It isn't necessary that every Perl feature be one that a non-Perl-
> programmer could guess precisely what it does without any documentation.
> We have qw; qa would be a handy variant, with a similar level of
> (non-)intuition, thereby keeping the overall intuitiveness level about
> the same for newcomers — while qa itself being exceedingly intuitive to
> Perl programmers who already know qw.

Respectfully, this is a straw-man; I didn’t say that it should be necessary (or even strongly preferable) that every Perl feature be fully understandable without reading documentation.

Perl, for better or for worse, suffers a reputation as being hard to read. In that light, I do think special care is justified when adding additional ways to do everyday tasks like creating an array reference.

qa// will save us relatively-few Perl veterans a few keystrokes here and there. This is “a bit of a win”. It will also complicate things a bit for the (I suspect) relatively-many Perl neophytes out there to grok a veteran’s code. Given that disparity of numbers, IMO the liabilities seem rather a greater loss than the gain we longtimers will realize. FWIW.

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