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.
😋
The best part of this thread is the people that come accusing others of "bad practices" or "it's either my way or the highway."
You gotta love this community.
The world is not binary.
There are good practices in Java that don't apply in JavaScript. There are C++ patterns that shouldn't be followed in Python.
• • •
Missing some Tweet in this thread? You can try to
force a refresh