6 ms·
You're making an argument from your experience, so permit me to make an argument from mine: I've been using Python and Ruby professionally for about 10 years.
by kpmah 11y ago
You're making an argument from your experience, so permit me to make an argument from mine: I've been using Python and Ruby professionally for about 10 years.
The most common error I make myself is typos, but those are often (but not always) fixed quickly. The most common mistake I see getting to production is not handling a return value or an exception because it was assumed it couldn't happen.
Types can help with both of these things, and tests less so - because often if you're making an assumption about the return value of a function, it's because you haven't considered the possibility and you don't write a test for it.
A dynamic language can certainly be good enough, but in my opinion never ideal.
- toolslive 11y agoJust take any large python project and search the bug trackker for : "AttributeError: 'NoneType' object has no attribute ..." You'll find plenty of those. So people are wasting time tracking and fixing something that could have been found by a machine (a compiler in this case) in microseconds. A colleague of mine once stated: "unit tests are a poor man's compiler".
- agentultra 11y agoWell if you want to get out the yard sticks I've been writing Python for more than 10 years. Exhaustive case matching is very useful, I agree. It is a common error in Python code (and in a similar fashion, to catch all exceptions however inappropriate). > A dynamic language can certainly be good enough, but in my opinion never ideal. If I think about it scientifically there are many cases where Python is ideal. For example the scientific Python stack, Jupyter, etc is very popular and, "ideal," in the sense that people frequently use it to get real work done. They don't have to categorize every expression and can instead focus on the data and transformations. As a data-exploration tool Python can be said to be ideal. It seems ideal too as the implementation language of OpenStack where the community supports over 4+ million lines of Python code. Could OpenStack have been better written in Haskell? Maybe. However thousands of contributors seem quite comfortable with Python and the process around developing reliable infrastructure software seems to catch critical errors in practice. I believe that strongly-typed functional languages are awesome. There are many situations where I'd prefer one over the other. However I don't deal in absolutes and don't believe Haskell is going to be the hammer that screws every dowel.