Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
paul-woolcock
on Aug 15, 2012
|
parent
|
context
|
favorite
| on:
Thoughts on being a programmer
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.
aneisf
on Aug 15, 2012
|
next
[–]
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.
mgurlitz
on Aug 15, 2012
|
prev
|
next
[–]
Wouldn't the Pythonic thing be to only fail after you've tried, instead of validating your parameters in advance?
agentultra
on Aug 15, 2012
|
parent
|
next
[–]
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.
DeepDuh
on Aug 15, 2012
|
prev
[–]
Is that really Pythonic? Isn't that just general best practice in programming?
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: