|
|
|
|
|
by nekusar
2 days ago
|
|
You misunderstand. I didnt need an explanation of how they worked. Im refuting that they are a good practice. I was complaining of the "cleverness" of them, when working or analyzing a codebase with people swapping from if/else loops to trinaries. I prefer clarity and a bit more verbosity than a per5-ism. If that means a 5 line loop that I can easily follow, then so be it. 1 liners that effectively say "lookie at me im a l33t developer" are a very bad code smell, and make maintenance harder each cycle of more cleverness. |
|
And every language has its idioms that are incomprehensible until you learn them. This isn't clever code so much as shorthand for common things.