Why are Perl 5's function prototypes bad?

后端 未结 4 1457
一个人的身影
一个人的身影 2020-11-22 03:56

In another Stack Overflow question Leon Timmermans asserted:

I would advice you not to use prototypes. They have their uses, but not for most cas

4条回答
  •  耶瑟儿~
    2020-11-22 04:28

    I agree with the above two posters. In general, using $ should be avoided. Prototypes are only useful when using block arguments (&), globs (*), or reference prototypes (\@, \$, \%, \*)

提交回复
热议问题