News for hackers. Stuff that matters.
Re:Thoughts on being a programmer by paul-woolcock on Wednesday August 15, 2012 @08:53AM (#4385690)
That strikes me as very Pythonic attitude. If you're going to fail, fail early. But, I know Python way better than Ruby, so it might very well be a Ruby thing too.
Re:Thoughts on being a programmer by aneisf on Wednesday August 15, 2012 @07:00PM (#4388788)
I'm not sure if it's Pythonic as I've never written Python. It's a habit I carried over from the .NET world, actually.
Re:Thoughts on being a programmer by mgurlitz on Wednesday August 15, 2012 @09:17AM (#4385796)
Wouldn't the Pythonic thing be to only fail after you've tried, instead of validating your parameters in advance?
Re:Thoughts on being a programmer by agentultra on Wednesday August 15, 2012 @10:00AM (#4385952)
Yes. It's easier to beg for forgiveness than to look before you leap. You just use your parameters regardless of types and let the exceptions fly.
Re:Thoughts on being a programmer by DeepDuh on Wednesday August 15, 2012 @09:49AM (#4385911)
Is that really Pythonic? Isn't that just general best practice in programming?