On Tuesday 23 October 2001 13:25, you wrote:
> Eric Lee Green wrote:
> > 10. Reference counting works hand-in-hand with Python's destructors to
> > handle resource cleanups in a real-time manner that's difficult with Ruby
> > (where you can set up destructors of a sort but they only run at garbage
> > collection time, which may be some time later, in the meantime you still
> > have some open files and files on disk hanging around that are not
> > getting cleaned up).
>
> Use the block paradigm instead. E.g.
>
> DBI.connect do | dbh |
>   # do something with dbh
> end
>

While nice in its context, this does not work for many paradigms. For 
(hypothetical) example, I have a class which maintains some state information 
in a database. When an instance is destroyed, I want the corresponding state 
deleted out of the database. But I don't know beforehand when an instance is 
going to be destroyed, because I am one programmer on a team of 50 
programmers working on this product. It is clear that a destructor is the 
most useful way of handling this situation.  

> > Java. I would not, however, relish attempting to manage 100K+ lines of
> > Ruby code for a project, while Python proved to be quite usable for 100K+
> > lines of code.
>
> I'd hold against your last sentence, but I never tried it out.
> But maybe 100K lines in Python are just 50K in Ruby ;-)

Destructors are just another one of those features of Python which are 
oriented towards making 100K+ line programs with multiple programmers 
managable in Python. I like Ruby for one-programmer projects, but I just 
can't see how it could scale well to multi-programmer multi-100K-line 
projects. I've used Python in such large projects and it works quite well. 
The compartmented namespace in particular was extremely useful for 
partitioning tasks between programmers -- I could give them total freedom 
over how they were to implement their part of the program without worry about 
whether they'd tromp over one of my global configuration variables or etc. 

Finally, regarding verboseness of Python vs. Ruby, I haven't noticed any real 
difference there. Both are fairly terse. There is at most a few percent 
advantage to Ruby here, mostly because the backtick syntax and regular 
expresson syntax is tighter. There just isn't anything compelling about the 
verboseness issue that would make a Python programmer switch to Ruby. Other 
issues (such as, e.g., the 1-1 mapping between many Ruby and Java features, 
which makes prototyping Java programs in Ruby quite easy) are probably more 
important here.

-- 
Eric Lee Green          GnuPG public key at http://badtux.org/eric/eric.gpg
           mailto:eric / badtux.org  Web: http://www.badtux.org
             You do not save freedom by destroying freedom