3 ms·
I know you're kidding, but there are legit videos saying you should never use If statements
by ehutch79 5y ago
I know you're kidding, but there are legit videos saying you should never use If statements
- lopatin 5y agoI wish I was kidding, but that sounds even worse! - https://www.youtube.com/watch?v=kzuCnivRoEw https://www.youtube.com/watch?v=kzuCnivRoEw - https://www.youtube.com/watch?v=_ougvb8mT7k https://www.youtube.com/watch?v=_ougvb8mT7k - https://www.youtube.com/watch?v=EumXak7TyQ0 https://www.youtube.com/watch?v=EumXak7TyQ0
- deanCommie 5y agoExcept...these are right. Minimizing nesting, and setting up validation failures as exit-early conditions from functions to have the main function body focused on the happy path are absolutely valid principles of clean code. Obviously there are always exceptions, but as a principle you could do a lot worse.