perl - Why don't functions have parameters listed in their defintions? -


i have begun playing around perl , hoping explain me why functions in perl don't have parameters listed in definitions, there language justification this?

it seems me lack of parameters in definition makes code harder understand. thoughts comments or insights appreciated.

sub func {    ($a, $b) = @_; } 

vs

sub func($a, $b) {  } 

perl 6 provides way so

http://perl6.org/archive/rfc/57.html

with syntax like

sub foo ($x, $y) {     ... } 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -