> If you passed too many or too few arguments to a function which worked this way, the extra arguments would silently be ignored, or missing arguments would silently show up as undef.
This part probably won't shock anyone given the prevalence of JS today. Which is kinda sad, given that it's 35 years since Perl was first a thing.
Re:Not Your Grandfather’s Perl
by Karrot_Kream on Friday September 09, 2022 @06:21AM
(#32777509)
Lol there were places, perhaps times, where Perl subroutines would "shift" as they go along, to create a prose effect. Sometimes you'd get a comment about it, but mostly not. Maddening for any longer function.
Function signatures turn this into something that'll look much more familiar to users of other languages:
which includes checks to make sure that all the expected arguments (and no more) were passed.