We are supposedly going to be able to set a class to be 
"uninheritable".  Will we be able to set a single method or attribute to 
be uniherited by any subclasses?  Please forgive me if this is one of 
the seven deadly OO sins.  I haven't yet had any formal education with 
regards to programming(aside from a short intro class using Fortran, but 
I've almost completely repressed those memories).

Also, I think this might have been discussed and I just didn't catch the 
answer, but can a method be declared in such a way that no subclass may 
redefine it?

In cases of multiple inheritance, will we be able to specifically say 
"don't inherit method 'z' from class C, where the inheritance looks like 
the following:

     A
    / \
   /   B - redefine method "z"
  /     \
C       D
  \     /
   \   /
    \ /
     E

So instead, class E inherits method "z" from class D, which inherits it 
from class B, rather than getting the original from class A via class C.

I'm a little bit afraid that trying to do inheritance as it at least 
*looks* right now will limit the flexibility of it.  I'm not sure how 
this psuedo-code to accomplish the above would translate into Perl6.

class E
        inherit C
                except z
        end
        # or...
        # inherit C
        #        rename z as C_z
        # end
        inherit D
end

Reply via email to