News for hackers. Stuff that matters.
Re:Skills Poor Programmers Lack by transreal on Sunday July 21, 2019 @12:47PM (#20492197)
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".
Re:Skills Poor Programmers Lack by Biganon on Sunday July 21, 2019 @01:09PM (#20492342)
Are 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
Re:Skills Poor Programmers Lack by wisienkas on Sunday July 21, 2019 @01:09PM (#20492337)
and 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