Which one do you prefer? The code on the left, or the code on the right?
I'd love to hear why.
I always was a “left” kind of programmer.
For quite some time now I’ve been forcing myself to use the right style.
Look at “EAFP vs LBYL”. Pretty interesting arguments.
- LBYL - Look Before You Leap. (Left)
- EAFP - Easier to Ask for Forgiveness than Permission. (Right)
Also, I love all of you, but it’s usually a good practice to answer the question using one of the two options instead of going with a third, imaginary option that you feel is better for your imaginary problem.