Quote from Sparohok:
<i>You are talking about compiled Python, I assume.</i>
Nope. Good ol' Python interpreter. You don't seem to understand my point. Programs spend most of their time in small parts of the code (Amdahls law). If your program spends most of its time in the Python library (for example array operations) then you do not pay a significant penalty for running under an interpreter. In the example I gave the penalty is no more than 10%.
If your critical sections are interpreted, then the slowdown against a compiled language will be much higher, 5x or more. Of course you always have the option to rewrite your critical sections in C while retaining the advantages of Python for the bulk of your code.
aaah.. yes, that makes it a bit clearer. I don't know if it's possible to run so much code only in the library, and I don't know how fast the library is, but this sounds more realistic.
I also appreciate more the idea of Python interfacing with native code, although I would probably prefer in that case to use only one language.
Quote from Sparohok:
It certainly helps. I'd much rather maintain 50,000 lines of Python than the 200,000+ lines of C++ I'd need in it's place.
Martin
Yes, it does. I will trust you on your 4:1 proportion
Quote from Sparohok:
Since you claim Python is ill suited for large projects, can you explain why? Your personal aversion to dynamic typing doesn't seem sufficient to draw such a broad conclusion.
Martin
mmmm, I personally consider it an important factor. The thing i liked least in Java is the lack of templates, that forces me to cast every time a use a collection. I change the type of the collection, nothing checks my casts. I can imagine that in the case of Python this can happen much more often (in complex code, of course).
But, just to put something more, I might mention (please tell me if I'm wrong):
1) limited access control. Python has a kind of private access that is not really private, and it doesn't have protected or anything like that. Even the C++ friend (which sucks) is missing
2) no checked exceptions. Thrown exception are not checked. Not that C++ is better, to be honest (there are tools, though; maybe something similar exists for Python). I personally prefer the Java solution.
Lack of enums can also be a bit annoying. I did see some workarounds, but I'm not sure how effective they are.
I am also aware of some strange syntax constructs, but this is probably very subjective.
Maybe I should mention one last thing. I haven't developed C++ for a few years, but it's still my language of choice if I have to develop a stand alone (non web) application, and mainly for one reason: performance. As a language, I have to say that since 1.5 Java is starting to be quite appealing, although I would still like a couple of things more