What's the reason for naming the cut?  In all of the code I've
seen so far, the actual cut is never used.  So instead of:

cut C < A ... end

why not:

cut < A ... end

or:

cut A ... end

The only thing I can think of off hand is that you might want
to remove the cut down the road.

Conceptually, I think it is easier to think of this cut
operating on the parent class (make it look like you're just
reopening the class).  You could think of this "cut" as
something just like "class" except that the superclass is
treated as the previous definition of "class".  This also would
extend well to making a cut on the meta class of an object:

cut <<obj ... end

From the syntax you proposed, it would be something like this I
believe:

cut A < <<obj ... end

I didn't see anything in the proposal about cutting the
meta-class of an object, but the above seems like what the
syntax would be.  Naming the cut just seems unnecessarily
verbose and complicates the concept.

Here are 2 other ideas that accomplish the majority of what you
are talking about without being so grandiose:

- have another type of def/#define_method (maybe
redef/#redefine_method) that allows redefinition of a method
such that "super" is treated as the previous definition.

- have another keyword like "super" that means previous
definition.

Right now you can actually manually do something like the
above:

class C
  def foo;"foo";end
end

c = C.new

c.foo # => "foo"

class C
  foo1 = instance_method(:foo)
  define_method(:foo) { "{"+foo1.bind(self).call+"}" }
end

c.foo # => "{foo}"

class C
  foo1 = instance_method(:foo)
  define_method(:foo) { "["+foo1.bind(self).call+"]" }
end

c.foo # => "[{foo}]"

Pretty sweet, huh?  I wasn't sure if foo1 kept the previous
definition until I tried it, but apparently it does.

Maybe just an easier way to do the above is all that is needed.
 I think the above covers what is really needed for AOP - and
we already have it.  Just simpler syntax is needed IMO.  No
extra baggage needs to be added to the class data structures.

I'm not sure why you guys made such a lengthy RCR.  I think I
have the concept now, but with all of the verbosity, it makes
it difficult to figure out what you are really proposing.  I
think a much more concise RCR would have been better.




		
__________________________________ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/