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

G_ARRAY should be called G_LIST

Thread Next
Paul "LeoNerd" Evans
May 31, 2021 14:07
G_ARRAY should be called G_LIST
Message ID:
I've been mildly annoyed about this for years. We have three kinds of
context in perl - void context, scalar context and list context. The
three constants for it are called G_VOID, G_SCALAR and G_ARRAY.


I propose to add a new G_LIST constant with the same value as the
current G_ARRAY, and perform a simple s/G_ARRAY/G_LIST/ across our
codebase to fix up this little cognitive roadbump.

I imagine adding a back-compat constant to ppport.h and similar should
be relatively straightforward.

Any objections?

(I don't plan to address `wantarray` right now, because that is visible
to perl code and would have far-wider consequences for renaming it)

Paul "LeoNerd" Evans      |  |

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