3 ms·
I see this in professional work. The former reads more like English, and so there feels like there is an argument to be made that it is more readable, and also
by transreal 7y ago
I see this in professional work. The former reads more like English, and so there feels like there is an argument to be made that it is more readable, and also an argument that "the compiler will optimize it for you anyway".
- wisienkas 7y agoand you question yourself if it was better to pack that readability into a function or not. Also why would anyone store a boolean named isDone rather than just returning it as the contract of the function
- Biganon 7y agoAre they wrong? To me, the long version is valid precisely because it is explicit (more to me than the short version), and will be optimized