Python vs Ruby

Bryan belred at gmail.com
Fri Oct 21 21:07:55 EDT 2005


Ed Jensen wrote:
> Sion Arrowsmith <siona at chiark.greenend.org.uk> wrote:
> 
>>I have here a library (it's the client side of a client-server
>>interface including a pile of class definitions) which has
>>implementations in pure C++, Java and Python, taking about 3000,
>>3500 and 1500 loc respectively. And there's an associated module
>>(with no C++ implementation) that I remember being particular
>>"impressed" while writing it to find being 3 times as long in Java
>>as Python despite (a) extensive (and pretty much common) Javadoc/
>>docstrings and (b) implementing in the Python version a feature
>>present in the standard Java library (scheduling a thread to run
>>at specified intervals and time out). Strip the Javadoc/docstrings
>>out and it's about at that 5:1 ratio.
> 
> 
> This claim seems pretty dubious to me.

i would not say sion's ratio of 5:1 is dubious.  for what it's worth, i've 
written i pretty complex program in jython over the last year.  jython compiles 
to java source code and the number of generated java lines to the jython lines 
is 4:1.

bryan




More information about the Python-list mailing list