<i>getopt still results in imperative argument parsing</i><p>That&#x27;s one of the reasons I use it, actually.  For simple utilities it may be adequate to set flags and store values for command-line parameters, but sometimes you need the flexibility of being able to run whatever code you need when an option arrives.