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

Re: G_ARRAY should be called G_LIST

Thread Previous
From:
Felipe Gasper
Date:
May 31, 2021 14:10
Subject:
Re: G_ARRAY should be called G_LIST
Message ID:
1DAD1A3A-8692-43B1-BA58-F62208231AA4@felipegasper.com

> On May 31, 2021, at 10:07 AM, Paul LeoNerd Evans <leonerd@leonerd.org.uk> wrote:
> 
> 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?

Sounds great to me. FWIW I think these kinds of clarifications will go a long way toward making Perl a more inviting platform from the C side.

-F
Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About