Friday, July 22, 2016

Perl prototypes quite useless

I already knew this - but to emphasize the point.



perlsub - perldoc.perl.org: "prototypes have no influence on subroutine references like \&foo or on indirect subroutine calls like &{$subref} or $subref->()"



Method calls are not influenced by prototypes either, because the function to be called is indeterminate at compile time



the intent of this feature is primarily to let you define subroutines that work like built-in functions



'via Blog this'

No comments:

Post a Comment