GetOpt formatting improvements
wnoise at ofb.net
Wed Jul 2 17:37:36 EDT 2008
On 2008-07-02, Neil Mitchell <ndmitchell at gmail.com> wrote:
>> > I think thats a really bad idea. We want options that work and do the
>> > sensible thing. When would a user want to set these options to
>> > different values? Without a use case, and a potential user, these
>> > extra variants are a waste of hard-drive space.
>> I thought the use case I had in mind was apparent from the context: finding
>> out the terminal width and then setting the wrap-width accordingly. And the
>> max. description indentation could be set as a percentage of the terminal
>> width. This is all quite similar to what pretty printing libs allow.
> I'd suggest a much better idea would be to have one function which did
> all this, in the IO Monad. Some sort of
> showTheGetOptHelpWithTheRightWidth :: IO (). Before adding a function
> I think its important to ask "what will this function be used for" -
> if there are no particularly good answers, then its best not to add
> it. If it happens to be a general case of something where everyone
> will want a specific case then the specific case seems more appealing.
Everyone? No one will want to ever put it into a gui widget with a
a width that's not 80? Composability and flexibility are cheap in this
More information about the Libraries