unfoldingWord / uw-content-validation

Functions for checking user&format errors in content fields/files
https://unfoldingword.github.io/uw-content-validation
Other
0 stars 0 forks source link

Tidy mixture of function parameter types #210

Open RobH123 opened 3 years ago

RobH123 commented 3 years ago

Some functions use parameters, e.g., functionA(username, languageCode, ...);

Others (mostly functions written by other uW programmers) pass objects, e.g., functionB({ username: adjustedUsername, languageCode, ...});

Having both forms is both confusing and error-prone.

Find out:

  1. Which is the most efficient form? What is the cost of the alternate form?
  2. Which is the preferred form? What do other uW codebases use?

Then decide which is best and make this code more consistent.

mandolyte commented 3 years ago

Note to self @mandolyte ; consider above...