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