3 ms·
I don't understand what that passage is supposed to mean. Yes, you write code to please the compiler. Moreover, you first look for ways to make the compiler har
by kazinator 3y ago
I don't understand what that passage is supposed to mean. Yes, you write code to please the compiler. Moreover, you first look for ways to make the compiler harder to please, rather than just use its defaults.
You don't write code just to please the compiler, but it's a big deal. (Obviously, if you just wanted to please the compiler, it wouldn't have to be indented, and your variables could have names like l0327.)
A sufficiently smart compiler could warn you that you're introducing an object X with the same meaning as object Y, so your coworker can sleep at night. Or if not compiler than some other tool. We can imagine tooling that scans the code base and tells you that a class exists that is very similar to what you just wrote.
A compiler was written by your de facto coworkers, likely in another organization far away. When their ball-busting attempts turn up nothing against your code, that is a kind of praise.