jarro2783 / cxxopts

Lightweight C++ command line option parser
MIT License
4.21k stars 591 forks source link

missing convenience functions and request to remove need for positional options descriptions #113

Open Xeverous opened 6 years ago

Xeverous commented 6 years ago

I have found few things to be annoying and want to request few changes:

  1. New functions. I do not want the library to construct strings and then manually print it. The library spams with redundant constructions. Why do I need to input a vector of group names? Would not init list be enough?

proposed new functions:

  1. Do not require users to remember groups - I want to add few gropus and then print help for everything. The current implementation requires me to save the strings into a vector, and then input that vector again to get the help string.

  2. Do not require anything for positional arguments. Currently there is no other way than specifying any (unneded) help for them.

jarro2783 commented 6 years ago

That all seems reasonable. I will look at this.

Xeverous commented 6 years ago

Initially I wanted to ask for std::string_view but given you aim for C++11 I resigned from this.

The most annoying I found was lack of print all help and no easy way to obtain all positional arguments

kannode commented 6 years ago

The ability to print help automatically would be really useful.

Xeverous commented 6 years ago

I'm kinda annoyed by the appended "options:" to every option group help - it limits what I can put there.

jarro2783 commented 6 years ago

I'll take a look at the options: thing too.

Where do you want to use string_view? Any functionality with that can always be optional dependent on the C++ version.

Xeverous commented 6 years ago

Where do you want to use string_view?

Honestly, everywhere.

jarro2783 commented 6 years ago

Could you be more specific? I'm not sure exactly how you would want to use it.

Xeverous commented 6 years ago

Everything that takes a string could potentially also take a sting view.

tesch1 commented 6 years ago

@Xeverous maybe English isn't your native language, so just to let you know: the tone of your comments is pretty annoying. It's nice that you offer some constructive ideas too, but it's a free library that obviously took a lot of time to write, so the least you could do before telling everyone about how annoyed you are is to say 'thank you' ;o)

Xeverous commented 6 years ago

@tesch1 By no means I wanted to sound like that. I'm already using your library which means I consider it better than the alternatives.

Comparing it to others it's simpler to learn and use but at the same time has some (likely unneded) things such as automatically appended "options:" to help string and no clear way to print the whole help without repeating group names.

I named it "annoying" because it's a good library but somewhat requiring to workaround the API to do what I want.

tesch1 commented 6 years ago

It's not my library, I'm just a user too, @jarro2783 is just too polite ;o) We're not paying for something which has a fairly significant market value, so... be a nice community member, contribute if you can, and give due credit to the effort and generosity of the author. It's probably fair to assume that he didn't write it to impress you :D If this is all just totally obvious to you, then just think of this as advanced-level feedback in the perception of tone in English :o)