------ extPart_000_0064_01C504CA.B67C9510
Content-Type: text/plain;
charset s-ascii"
Content-Transfer-Encoding: quoted-printable
Hi
The current situation in Ruby with method calls is
class A
def meth(arg1)
end
end
class B < A
def meth(arg1,arg2)
end
end
a = A.new
b = B.new
b.meth(1,2) is fine but a.meth(1,2) . This is fine but what one assumes is
that when a method is overridden, you wish to override the implementation.
In that case, this is a problem.
My suggestion is 2 options.
Option 1:
Make all the methods as variable arguments. If a method is get more
arguments then it uses, it can safely ignore the extra ones. In case it gets
lesser ones (I am not sure here) , it may take the values as nil.
I do not think this is a good option but messaging based languages like Ruby
might prefer them.
Option 2:
Mangle method names with number of arguments. meth in class A becomes meth_1
and meth in class B becomes meth_2. So, B is not actually overriding the
meth.
regards,
Mystifier
http://vuby.berlios.de
------ extPart_000_0064_01C504CA.B67C9510--