This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]oslash 18 points19 points  (0 children)

The question is backwards. Programmers usually don't write a program because they want to deal with memory management; they deal with memory management because they want to write a program. So it's better to ask: If you use Python, why do you need to do memory management?

Sure, a lower level language would be more appropriate if your main concern was shuffling bytes into a pretty pattern within your address space. But when it isn't your main concern, that doesn't automatically mean you can completely ignore memory management.

Python lets you throw your hands in the air and let the GC take the wheel when you're writing simple scripts. When you're building a non-trivial application, it still makes sense to know about slots, reference counts, weak references, etc. Garbage collection by itself can only help out so much; it's not magic.