[Home]Adaptive Formatting - First Field Width - Program Options Suggestion

BOOST WIKI | RecentChanges | Preferences | Page List | Links List

Adaptive formatting (first field width)

Back to Suggestions - program options library


The usage message formatting should be adaptive to the width of the first field of the message. For example, currently, we might get:

    Allowed options:
      -v val                 : some value 
      -w word                : some other vlue

This should look like:

    Allowed options:
      -v val  : some value 
      -w word : some other vlue

Also, when a field is too wide, we get:

    Allowed options:
      -v some-excessively-long-string : some value 
      -w word                : some other vlue

which should look like:

    Allowed options:
      -v some-excessively-long-string : some value 
      -w word                         : some other vlue

There ought to be a maximum width for the first field.

    - People/Chuck Messenger


What worries me is that with adaptive formatting if you add a new option, the ":" line will move -- and the help message look, which is probably familiar to user already, will change. The current behaviour is that there's maximum width for the first field, and ":" is placed at the end of that width.

    - People/Vladimir Prus


But the problem is that, very often, the width is so wide that it looks strange. If the usage message looks strange, people won't like the library. People take great pride in superficial things like that. And for good reason, too, since people also judge on those superficial things. (and I count myself among those people) A program with a clunky usage message gives the impression of a sloppy program. Stupid, perhaps, but that's human nature. For that reason, it's fairly important, I think, for program_options to at least not make really strange-looking usage messages. At least not by default.

    - People/Chuck Messenger



BOOST WIKI | RecentChanges | Preferences | Page List | Links List
Edit text of this page | View other revisions
Last edited December 18, 2004 12:47 pm (diff)
Search:
Disclaimer: This site not officially maintained by Boost Developers