First, why *doesn't* Perl support strict function-argument specification? I can see that prototypes don't really do this, but... I'm surprised that there is no easy way to enforce it. Is this a result of the way Perl seamlessly casts between ints and strings?
The only answer is really "because". Perl5 decided to keep the argument passing strategy very simple. This does have advantages on occasion - and can be surprisingly elegant.
Along with everything else, you'll get it in Perl6 - see Apocalypse 6 for the full details.
In reply to Re: Considering Prototypes
by adrianh
in thread Considering Prototypes
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |