Current subroutine signatures implementation contains two features which purposes are different
I want to write about subroutine signatures more.
This is previous topic.
Current subroutine signatures contains tow difference features
- Syntax suger of my ($x, $y) = @_
- Arguments count checking
My opinion is that this two features has different purpose. First is for syntax sugar. Second is for aruments count checking.
I think it is good to separate two features because each feature has different purpose.
I don't hope "perl subroutine + (syntax suger + argument count checking)".
I hope "perl subroutine + syntax sugar + argument count checking".
It is not good that different purpose features is mixed into one feature.
I want syntax sugar and I don't need argument count checking in my program. This is natural for me.
but there are people who want also argument count checking.
We should not assume all people want arumengt count checking.
Syntax sugar is the feature most poeple wait, but argument count checking is not.
It is safe implementaion in the Perl future that any perfomance cost don't force to user
I can't show benchmark because this discussion is not for current implementation.
My point is that "It is safe implementaion in the Perl future that any perfomance cost don't force to user".
If the performance of subroutine call will improved in the future, the performance limitation maybe argument count checking.
And I think it is good that subroutine signatures is designed for the improvement of subroutine performance, not usability.