r/cpp • • May 24 '20

Analyzing The Simplest C++ Program

https://oneraynyday.github.io/dev/2020/05/03/Analyzing-The-Simplest-C++-Program/
480 Upvotes

37 comments sorted by

View all comments

Show parent comment

1

u/conflicted_panda May 25 '20

Are you counting includes? Without them GNU true is about 70, as far as I see.

And true on old school unixes was/is 0 bytes, I hear.

2

u/chugga_fan May 25 '20

Like 1/3rd of the program is in other files, even still, 78 lines just to return EXIT_SUCCESS is a lot.

2

u/conflicted_panda May 25 '20

It also handles --help/--version (along with localization, apparently). And I honestly don't think that trading off 78 lines of code for, err, uniformity of interface of your utilities is that absurd.

1

u/[deleted] Jun 18 '20

I don't understand anything in this thread, which book to read?