From: David Alan Black Date: 2001-08-11T23:21:32+09:00 Subject: [ruby-talk:19531] Re: order and freedom in Ruby (was: Re: Re: the way class variables work) Hello -- On Sat, 11 Aug 2001, MikkelFJ wrote: > > "David Alan Black" wrote in message > news:Pine.LNX.4.30.0108110803010.5632-100000@candle.superlink.net... > > > Way 1: Ruby presents different interfaces to the programmer. You can, > > if you choose and/or need to, use Ruby to handle your traditionally OO > > projects. Or you can use Ruby pseudo-procedurally. Or you can tap > > into Ruby's powers in the area of dynamic method creation and related > > things. > > But then we should perhaps go in the other direction: > Add syntax for manipulating class functions in a way that distribute to all > derived classes and object instances. It sure is a mess, but imagine the > interesting things you could do, if used appropriately. Isn't that what happens if you manipulate a parent class (without having overridden the things you're manipulating)? class A def talk; puts "original" ; end end class B < A ; end class A def talk; puts "changed" ; end end B.new.talk # => changed David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav