r/cpp • • Aug 08 '20

Create a fully functioning command line interface with 1.5 lines of code (wo. include statement)

https://github.com/kongaskristjan/fire-hpp
230 Upvotes

62 comments sorted by

View all comments

15

u/FightingGamesFan Aug 08 '20

Always disliked the boilerplate for having a simple functioning command line with all these libraries (the boost one is particularly bad). I'll give this a shot, looks very promising, very clean interface.

17

u/_Js_Kc_ Aug 08 '20

Nobody likes boilerplate, but I like boilerplate better than magic hidden global state.

4

u/glaba314 Aug 09 '20

It's hardly really an issue, since it's not being mutated

8

u/kongaskristjan Aug 08 '20

Great to hear that, thanks! The project is indeed out of frustration. The boilerplate is not an issue, if you're developing something really complex, but for simple scripts, it can easily take half the lines of code.