4 ms·
Think of it as writing in a natural language. You are writing a story that someone else has to read and follow. The compiler will know what you mean if you use
by papito 3y ago
Think of it as writing in a natural language. You are writing a story that someone else has to read and follow. The compiler will know what you mean if you use the the right words, but you are really not writing the code for the compiler - you are writing it for other people.
Clarity is more important than performance, and in many cases the performance gain is imaginary in the first place.
Every time I write code and tell myself "I will just keep in the back of my mind why I did that", I know I am writing bad code. There should be no open loops, you should not have hidden knowledge in your brain about how the code works.