From: MikkelFJ Date: 2001-08-11T23:03:35+09:00 Subject: [ruby-talk:19527] Re: order and freedom in Ruby (was: Re: Re: the way class variables work) "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. The justification is that you either use OO via the Ruby OO interface and code doesn't mutate. Or you enter the Ruby mutation interface and think in an entirely different way about programming. Objects becomes representations of something larger - like a diplomat or attache, where instructions can change during the course of action. Name this Representation Oriented Programming ROP. For instance you could change trade strategy for a family of stock trading agents. This is only a mess if you assume you objects doesn't change. If you start to think about objects as dynamic individuals in a changing world, you wouldn't be surprised anymore. Mikkel