Perhaps off-topic, and I don't remember where I have this from, but ordering of parameters is partly conceptual, partly a documentation issue. The suggestion is to put the parameters in a sentence (and use that sentence always in the function help). E.g.
- search needle in haystack (this variant is probably a "false friend" for non-native speakers) → "needle" parameter goes first, then haystack
- search haystack for needle → "haystack" parameter goes first, then needle
Of course, your sentence(s) would be much longer, but once you have a "natural" phrasing, you have a "natural" order of the parameters. And, as the example shows, word use
is important…
This is (programming) language independent, btw.