From: Bjorn Pettersen Date: 2001-08-08T00:25:09+09:00 Subject: [ruby-talk:19296] Re: Perl/Python/Ruby common backend (Parrot, can Ruby play too?) > From: Alex Martelli [mailto:aleaxit@yahoo.com] > > "Phil Tomson" wrote in message > news:X2Jb7.24637$C7.9671673@e3500-chi1.usenetserver.com... > ... > > Questions for the Ruby community to ponder: What sorts of > features do we > > need that might be unique to Ruby? [One that comes to > mind: the ability > > to extend an existing class.] For the > > In what sense is this "unique to Ruby"? The following works > in Python: > > class Existing: > def one(self): print 'one' > > anInstance = Existing() > > def two(self): print 'two' > Existing.two = two > > # and now you can call anInstance.two(), having > # extended existing class Existing "after the > # fact" -- already-created instances also get > # to use the 'extensions' to the class. I think the only need I've seen so far in Ruby that isn't neccessary in Python is functionality for providing call/cc, and being able to add methods to "built-in" classes, like Fixnum (Python int), and Array (Python list). Python 2.2 might let you do that also however. -- bjorn