Movatterモバイル変換


[0]ホーム

URL:


why python annoys me

D-Mandsh8290 at rit.edu
Thu Apr 19 13:22:57 EDT 2001


On Thu, Apr 19, 2001 at 05:57:28PM +0200, Rolf Magnus wrote:| Jaap Spies wrote:|| > Did you give Jython a try? With Jython you can use the 'nice things of| > Python' with the best of Java.|| With "the best of Java", do you mean the poor memory management? I heard| that's one of the biggest difference between Python and Jython.He meant the extensive libraries that exist and are being made and"sold" (ie convincing management that java & libs are good) rapidly.Yes, Jython and CPython (Jython is Python, you know :-)) havedifferent memory management techniques.  CPython is implemented in C,where malloc/free are used to manage memory, and it is the programmersjob to do it right.  CPython chooses to use reference counting todetermine whether or not a Python object needs to/should be freed atany given time.  Jython is implemented in Java.  As such it runs ontop of a JVM.  As a result Jython can not do any better than the JVM'sgarbage collector for freeing memory becuase java does not provide amanual mechanism like free().  A design decision, no doubt influencedby this fact, in Jython is to use the JVM's gc to handle the memorymanagement and not bother with ref counting at all.  So yes, Jythondoes have just as much memory problems as Java because Jython is aJava program.-D


More information about the Python-listmailing list

[8]ページ先頭

©2009-2025 Movatter.jp