Ethan,
I think majority of your complaints about python result from its very
purpose - to be readable/portable for the sake of facilitating rapid
implementation. There are many other languages that provide tools to
accomplish what Jacob wants to do (well, I would stay away from P''),
but python definitely is a good option for casual calculations.
On 09/12/2012 02:28 PM, Ethan Merritt wrote:
I'm sure you can google for many "reasons I hate Python" lists.
Mine would start
1) sensitive to white space == fail
every language has a way to group lines of code. Curly brackets are
fine, but python is designed to force code readability, and preceding
white space (btw, everywhere else it is ignored) does that.
2) dynamic typing makes it nearly impossible to verify program correctness,
and very hard to debug problems that arise from unexpected input or
a mismatch between caller and callee.
While indeed 1/3=0 (but so it will be in C), I think it's a bit of an
overstatement that python code execution is "nearly impossible to verify".
Another goal of python is to accelerate implementation, and dynamic/duck
typing supposedly helps that. The argument is simply that weak typing
favours strong testing, which should be a good thing.
3) the language developers don't care about backward compatibility;
it seems version 2.n+1 always breaks code written for version 2.n,
and let's not even talk about version 3
I don't think that's entirely true either, why would they then backport
certain features from v3? The decision to not provide backward
compatibility was well explained. While 2to3 converter may potentially
fail on complex code, the very fact that it was implemented confirms
that python developers do care about the issue to some extent. While I
definitely agree that it is annoying when a module you rely on is
deprecated, there is a strong argument that a clean break is sometimes
better than continuous patching of a code that outlived its initial design.
4) sloooow unless you use it simply as a wrapper for C++,
in which case why not just use C++ or C to begin with?
Native python is not meant for number-crunching, but wrappers such as
scipy allow one to combine python flexibility/readability with speed of
compiled binaries. One reason to use python over C/C++ is portability.
5) not thread-safe
I am definitely not an expert on this (or anything else), but afaiu this
is not unique to python.
Cheers,
Ed.