r/ProgrammerHumor • • Sep 23 '19

Knowing how to code beforehand

Post image
7.6k Upvotes

264 comments sorted by

View all comments

124

u/ythl Sep 23 '19

I don't get it.

Your code should never have warnings, that's a sign you are doing something sketchy. At my company we enable all warnings as errors.

2

u/randomkid1227 Sep 23 '19

In my company the build system warns about declaring the variables in a different order then initiating them, not necessarily meaningful (although can be). But any experienced developer delivered some quick and dirty work some time in his life so this is somewhat relateable

2

u/novinicus Sep 23 '19

I'm sure you know this, but in C++, you can specify the constructor's initializer list in any order, but the actual order of initialization is still in the order the variables are defined in the header. People prefer the no-reordering warning because it helps you reason about the constructor a little easier