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

G_ARRAY should be called G_LIST

Thread Next
From:
Paul "LeoNerd" Evans
Date:
May 31, 2021 14:07
Subject:
G_ARRAY should be called G_LIST
Message ID:
20210531150736.436cd480@shy.leonerd.org.uk
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.

Yes, 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

leonerd@leonerd.org.uk      |  https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/  |  https://www.tindie.com/stores/leonerd/

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