c++ - Levels of Indentation -


How many indentions do you consider fair?

I think the level of C ++ / 5 + indentation with 4 is generally a bad thing, that means you have to mentally track 4/5 + full time things .

Is my opinion fair?

(Yes, I can not avoid indentation from multiple levels at all)

I agree with you if a function is more than 4 or 5 then try / switch / loop / statement, parts of it should be removed in their work.

This will make the code more readable because the names of the extracted functions are usually more descriptive than the code.


Comments