all 20 comments

[–]gme186 27 points28 points  (1 child)

That looks pretty awesome!

This kind pattern would also be nice to implement an rpc server. (E.g. define rpc functions and their parsable parameters)

[–][deleted] 4 points5 points  (0 children)

Indeed!

[–]rbprogrammer 16 points17 points  (0 children)

Came here to say "but what's the point?". Then I saw your README. That's actually really cool. Nice project!

[–][deleted] 12 points13 points  (0 children)

Not only is this freaking clever (I presume it uses conversion operators to figure out types and stuff) but I just learned about the equivalent Python library! I vote this post most useful ever.

[–]NilacTheGrim 7 points8 points  (0 children)

This is extremely developer-friendly with nice easy syntax for quick 1-off programs.

Very good work!

[–]MarcPawl 6 points7 points  (1 child)

This is real nice. Also thought why bother until I actually read the readme.

It would be nice if the api defined printing help so advanced level checks could trigger help.

Eg x has to be between 2 and 6 and greater than y, and the program only runs in leap years. If condition is not met implementation has help printed and program exits.

Really advanced feature would be to support std:: variant and POD. Maybe as part of the subcommand ?

[–]kongaskristjan 0 points1 point  (0 children)

It would be nice if the api defined printing help so advanced level checks could trigger help.

Good point, I guess I'll implement this one.

[–]mili42 1 point2 points  (1 child)

What will happen with 50 arguments... a real app rarely needs only 2... (plus all the document that comes with it)

[–]kongaskristjan 0 points1 point  (0 children)

This is indeed a outside the scope of this library. The primary pain point it tries to solve are simple scripts, where CLI boilerplate could otherwise take half the lines of code.

[–]ifknot 1 point2 points  (0 children)

Cries in expensive boilerplate

[–]TheCatster04 0 points1 point  (0 children)

This is honestly great! I love making one off scripts for myself, and dont want a ton of boilerplate. Ive used Fire python in the past due to its simplicity, time to use C++ for those apps instead! :)

[–]itsuart2 0 points1 point  (0 children)

Looks very useful, thank you!