"Mr. Shawn H. Corey" schreef:
> Tom Allison:

>> Maybe I'm getting old, but I'm starting to thing that if there is a
>> method/sub/function/whatever that has more than one argument, one
>> should always pass the args as a hash reference.  This eliminates
>> the problems of getting the variables out of order.
>> 
>> It's probably slower and higher memory usage, but it seems to make
>> sense. 
>> 
>> Any one else have suggestions on how to keep the args straight?
> 
> The problem with using hashes is that a typo means the argument
> doesn't get passed. One of the things `use strict;` does is catch
> spelling mistakes.

See also inside-out objects.

http://dagolden.com/talks/20060117_whats_all_the_fuss.pdf 
"Property-name typos are compile-time errors, not run-time bugs"

-- 
Affijn, Ruud

"Gewoon is een tijger."

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to