Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
C0D4681462yDid you just use a fucking ternary on something that can be as simple as:
return !a;
This, is why I hate the world,god damn ternary lovers. -
I’d prefer
return a == 0;
instead of
return !a;
to avoid implicit int to bool conversion. -
-
C0D4681462y😂 well that blew up.
I have a hatred of ternaries from people abusing them.
There's nothing I hate more then several nested together for no reason other then "because I didn't want to write if/else" or "switches are hard" -
@C0D4 that's exactly what I'm going to do in my next project just to spite you :troll:
-
@Ranchonyx if you want truly madness.
implement an object mimicking arrays and use it with key string to value callback as switch replacement.
Makes so much fun to untangle.
return mapper->get('yolo')['moo'] ? mapper->get('frolic')->value : $mapper->get('cloudy')->getFallback('yolo'); -
Return a == 0
Come on… why prioritize a dirty code over a clean code …
Maybe people loves challenge especially isn’t -
@C0D4 i was today years old for making that connection... literally didnt think of that... been writing code for 15+ years... learn something everyday
Noice
joke/meme