this post was submitted on 02 Oct 2024
147 points (98.0% liked)

196

17002 readers
1368 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

If you have any questions, feel free to contact us on our matrix channel.

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 38 points 4 months ago (1 children)

Bad naming practice. CheckSuck implies it only checks and returns the result. Everything the function does should be included in the name to avoid confusion. Call it SuckIfUnsucked or something

[โ€“] [email protected] 6 points 4 months ago

That was my first reaction as well. Even if you say you can see that it doesn't return a bool it's still ambiguus as to what (if anything) happens when the state is sucked/unsucked. I would also prefer a name like GuranteeSucked or EnsureIsSucked.