1

So, I have a nested ternary, right, and that's not very readable:

(x <= y ? z : (x <= z ? y : x));

The linter points this out and I'm like yeah, valid point. So I inline-F[*0] it:

if (x <= y)
········return z;
else if (x <= z)
········return y;
else
········return x;

Clearer? Kinda. Oh, but the linter doesn't like this either, and to be fair, valid point once again; an else-after-return *can* be quite confusing if you have it in the __middle__ of the F body, catches you by suprise.

However, I'd like to take a brief moment to waggle your nutsack, if you please. Because this is C++ and I'm picking a reference from a list of values, so I can't simply assout[*1] within the switch.

So I'm at the crossroads of life once again, losing man's toughest struggle as I sit on a metaphorical cigar, squirming while I unclench my asshole slowly for strictly defecatory purposes. Allow me to illustrate:

- If I ignore the linter, and leave the rest of the code unchanged, the checks are going to fail and the bot is going to taint my pristine PR with automated comments.
- But if I take the linter's advice, I have to do a slight rewrite of the damn thing plus every F that calls it, which means touching shit that has nothing to do with this issue.

So what's it gonna be? Flushing or shoving my own excrement? Oh, the thrills of it being (literally) SOLID, ie not the acronym, but may the Almighty punish Uncle Bob regardless.

NOTES:
[*0]: It means 'function,' what else?
[*1]: ASS-ign OUT-put, where 'out' is just some var. You modify the var within the F body and return the final value.

Comments
  • 0
    That's high tide for a cheeky #pragma push(fuckyou) or #![alllow(fuck_you)] depending on your lang
Add Comment