I am building a multi-language API to query key value stores and I am debating (with myself) about whether to use fixed argument lists or dynamic argument lists using hash tables.
In general I do realise that static type checking is not possible when using hashes, but as long as there are unit tests this is not a problem. But are there any other disadvantages?
For instance, using arguments:
set(Key,Value)
:and using hashes:
set(key: Key, value: Value)
Update: I have since read this: There are some instances where keyword communication is inferior to positional. The most obvious is the call to a procedure that is defined having only a single parameter. The keyword is, of course, unnecessary. Generally, keywording without defaults will require more keystrokes; keywording with defaults will require less. For some of today's machines, the processing of keyword sequences will be somwhat more expensive than the processing of positional sequences. The most disturbing disadvantage may be that an unintantional omission of a parameter on the programmer's part might lead to a program executing incorrectly, but without noticeable errors, since the default value for the parameter would be used.