> I don't miss perls halfarsed function args.
You mean you don't like writing things like...
sub foo {
my ($a, $b, $c) = shift;
?
Yes, I hate to write
sub foo($$$) {
my ($a, $b, $c) = @_;
}
Where @_ is array of arguments, and ($$$) is function prototype (3 scalars are expected).Not sure if you've deliberately put in two bugs there haha
1. shift only shifts off the first element.
2. (if classify this as a bug) using $a and $b are frowned upon because they're the default variables when using sort.
Indeed!
It just grinds my gears that _I_ need to check to see if the caller has given me all the required bits. That seems like something the language should do.
I understand that it does give you a lot of flexibility, but Hnnnnnnnnn
(from what I recall object oriented perl doesn't give you this flexibility, but I'm not sure, as I never really did it. )