develooper Front page | perl.perl5.porters | Postings from January 2022

Re: PSC #049 2022-01-07

Thread Previous | Thread Next
Darren Duncan
January 16, 2022 02:46
Re: PSC #049 2022-01-07
Message ID:
On 2022-01-15 4:43 p.m., Ricardo Signes wrote:
> On Sat, Jan 15, 2022, at 6:02 PM, Yuki Kimoto wrote:
>> Is it possible to include an arity check discussion?
>> The arity check discussion seems to be ignored.
> *This topic has been discussed numerous times over the last seven years, and I'm 
> not going through it again.  This will be my last reply to any message on the 
> topic of changing the strict arity checking of subroutine signatures.**
> *

I for one also support keeping the existing strict arity checking in place for 

If one is using signatures then that usually implies that the arguments they 
explicitly declare are the arguments they expect and that someone calling it in 
any other way is making an error.

When a routine writer wants to allow a variable number of arguments, there is a 
means provided to declare that explicitly in signatures.

And otherwise routine writers who want the old-style least strict behavior can 
still get it for a sub by not using signatures and using @_ instead.

-- Darren Duncan

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