Re:PostgresJs: The Fastest full featured PostgreSQL client f...
by porsager on Saturday October 14, 2023 @11:30AM
(#37881261)
It's all about familiarity. To me ternaries gives me less ways in which the code can behave, so it takes less time to write, and less time to read. The obvious reason is that it's an expression and not a statement. So, the reason for me not writing it like this to begin with, is because I prefer ternaries over ifs. So much that i sometimes rewrite other code from ifs to ternaries to better grasp it. But that's me.
In my head I’m having to cast these to an if to figure it out anyway - why not just write it like that to begin with?