Timeline for How can wrapping an expression as a function be Clean Code?
Current License: CC BY-SA 3.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 2, 2023 at 16:38 | comment | added | gnasher729 | But then I probably don't care whether a is verified, but only if the whole thing is verified. If the rules change next week that to be verified, a needs to be verified and b needs to be verified, but only if it exists, then the caller can continue calling isVerified. | |
| Apr 20, 2017 at 6:55 | comment | added | Frank Puffer | @imel96: Yes, at least it is not obscuring, but still no improvement over the original this.a.isVerified(). Therefore I would not define a function in this case. | |
| Apr 19, 2017 at 20:27 | comment | added | imel96 | I see, you're saying that it'd make more sense if isVerified() called isAVerified() it it only test a's status | |
| Apr 19, 2017 at 19:58 | history | answered | Frank Puffer | CC BY-SA 3.0 |