Hi Jason,

Jason McIntyre wrote on Mon, Aug 16, 2021 at 12:02:13PM +0100:

> when i wrote my mail, i failed to understand that "overrides earlier"
> was really just another way of saying "mutually exclusive".

That is incorrect.

This is what "mutually exclusive" means (without further qualification):

   $ frob -f -u
  usage: frob [-f | -u]

This is what "overrides earlier" means:

   $ frob -f -u
  output from successful unfrobnification

   $ frob -u -f
  output from successful frobnification

> i don;t find it as clear, and i don;t hugely like it, but i guess
> it's just my preference.
> 
> i also dislike the sentence structure of "Overrides earlier -f."
> although it's understandable, it reads like there's a word or phrase
> missing.

Yes, it is an elliptic wording.

> Overrides earlier instances of -f. Overrides previous -f options.

Both are still elliptic.

The intended meaning of the ellipsis is:

  [This option] overrides [any] earlier -f [options].

Should we prefer the non-elliptic wording?

> i just find it clearer when we just say -x and -y are mutually exclusive.

OK, let's spell this out in full.

I'm aware of two ways to document "mutually exclusive":

  -f   Frobnicate.  Mutually exclusive with -u.
  -u   Unfrobnicate.  Mutually exclusive with -f.

Or:

  -f   Frobnicate.
  -u   Unfrobnicate.
  [...]
  The options -f and -u are mutually exclusive.

I have no strong preference either way because if a user specifies both,
they get the usage() message, so the error is likely to be discovered
either way.


I'm aware of two ways to document "overrides":

  -f   Frobnicate.  Overrides earlier -u.
  -u   Unfrobnicate.  Overrides earlier -f.

Or:

  -f   Frobnicate.
  -u   Unfrobnicate.
  [...]
  The options -f and -u override each other [and the action
  is determined by the last one specified].

I prefer the the former because the latter is easy to miss (in
addition to being longer), and there is no error message to tell
the user that *something* is going on.


Some pages use

  The options -f and -u are mutually exclusive and override each other.

as a synonym for

  The options -f and -u override each other.

That may have caused your confusion.  Arguably, it might be better
to avoid the somewhat redundant and potentially confusing wording
"are mutually exclusive and override each other".  Do you agree?

Yours,
  Ingo

Reply via email to