From: Paul Brannan Date: 2001-10-24T06:00:48+09:00 Subject: [ruby-talk:23090] Re: Bruce Eckel's opinion of Ruby On Wed, 24 Oct 2001, Michael Neumann wrote: > Use the block paradigm instead. E.g. > > DBI.connect do | dbh | > # do something with dbh > end > > or This works fine for short-lived objects, but how can I use blocks for objects that get passed around? I think that would be a case where I would have to implement my own reference counting in Ruby. Not a common case, imo, but still important to consider. > > 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 ;-) The problem is not the number of lines itself, but that projects that large have certain needs, and Ruby makes it difficult to meet those needs. For example, using inheritance in Ruby on a team with many programmers may be difficult, because really is no such thing as private instance data in Ruby. Nifty funtions like send() and method() allow the user to call private/protected methods that they should not be allowed to call (at least, not by accident). Ruby lets you define a public method in a derived class that was private in the base class without so much as a warning, so you need to have full knowledge of the base class's *private* interface if you don't want to break something. I also find myself reinventing the wheel in Ruby a lot, because some library doesn't exist for Ruby or it doesn't work the way I want it to. (Perhaps this is an advantage of Ruby, though, because it gives the Ruby world a chance to get things done right, instead of having to maintain compatibility with older versions). I think it's very important that we keep in mind that as good as Ruby is, it does have a long way to go. Paul