argparse vs getopt
Eric S. Raymond
esr at thyrsus.com
Thu Jun 15 13:24:20 UTC 2017
Ian Bruene via devel <devel at ntpsec.org>:
> Nice timing; in testing the getopt version I think there is an assumption
> that needs to be examined.
> Does there need to be a default logfile name in the first place?
> The only time it is needed is when the user specifies logging to a file.
> Implementing a default means that ntpq needs an entire option, and for what?
> Debug logging to a file is an inherently unusual operation. Either the user
> wants the file for immediate use (no default needed), or has an alias setup
> for automatic logging, and then any default should be in /var/log/ or
> whatever, not the working directory (and the alias can specify that).
Good argument. The only question is whether the semantics you propose
would create a confusing difference from ntpd.
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
Please consider contributing to my Patreon page at https://www.patreon.com/esr
so I can keep the invisible wheels of the Internet turning. Give generously -
the civilization you save might be your own.
More information about the devel