Open Bug 1645002 Opened 4 years ago Updated 2 years ago

Naming convention for result values

Categories

(Core :: DOM: File, task)

task

Tracking

()

People

(Reporter: sg, Unassigned)

References

(Blocks 1 open bug)

Details

There should be a naming convention for local variables for result values, for values to be returned from a function, which are not just success/error results such as nsresult or bool typed results.

Options include:

  • res as a generic name
  • result as a generic name
  • non-generic names that are dependent on the context

rv and ok are reserved for nsresult resp. bool values by the global coding style.

This has been discussed in https://phabricator.services.mozilla.com/D77452#inline-454098, e.g.

You need to log in before you can comment on or make changes to this bug.