Manual memory management is only a minor inconvenience if you do it properly. |
What do you mean by "properly"? I've heard this statement many times from C++ coders, but everyone I ask gives a different recipe.
Also programmers I know that program in GCed language for a longer time commercially (not just a single project at university) don't want to go back to a non-GCed language, unless absolutely necessary.
Why? Manual memory management forces you to have some kind of an owner for every object. This imposes a serious limit on how you design your program. Even a trivial thing like managing two collections sharing objects can be a pain then. Additionally, imagine adding a caching layer to an existing application. Who should own the cached objects now? The cache, the previous owner (might be many owners), or the client? It is easy to introduce subtle errors, even with all the modern STL machinery. I'm not saying you can't do it, but that having to manage memory by yourself introduces new dependencies in code (e.g. between the cache and the owner of the cached objects). And dependencies are bad.
If you'd like to check your "manual memory managment skills" (and if it is really just a minor inconvenience), try to implement a persistent data structure [1] in C++ and make it fast on multi core system (this is the main purpose of persistent collections; you can't use reference counting, because it does not scale on multicore).
Also, Python code can never be truly self documenting because type informations are lacking |
Agreed. But when compared to Scala, which can be also viewed a scripting language, C++'s type system is also lacking in this regard .
Now that's just plain wrong, in Python at least. You DO need to know that arguments are passed by reference, and what the difference between |
Well, you need to know argument are passed by reference and what it means. Period. Nothing more. Never had to think about whether I should pass it by ref by val or by pointer, or by const ref... etc.
I guess my main complaint is that those languages aren't really much more expressive than, for instance, C++. |
If code is much shorter, they are.
[1]
http://en.wikipedia.org/wiki/Persistent_data_structure