in reply to Re^3: Adding attributes to values?
in thread Adding attributes to values?
I think positional parameters are ok if you are not passing more than 3 or 4 and you don't have any dummy parameters. What I consider to be ok also depends on if the function is used often or not. For rarely used functions I find that named arguments can often make the code more self-documenting. For functions that are used often I often prefer the less verbose style of positional parameter passing as long as the criteria above i met.
But such things are matter of personal coding style. I want to create a module for parameter validation that lets the user of a function with parameter validation decide the appropriate calling style and the module author just worrying about writing the appropriate signature. If the module turns out to be any good I will post it as an RFC under Meditations.
|
|---|