On Monday 07 June 2004 19:55, David A. Black wrote:
>
> It's interesting; I'm actually having trouble coming up with much in
> the way of components of Ruby method semantics.  There's number of
> arguments... but I'm not sure I can think of anything else.  Arguments
> are untyped and methods don't have a return type, and whether or not a
> method requires a block (another candidate criterion) might depend on
> what happens at runtime.  So in determining whether two methods are or
> are not semantically equivalent (and I assume this has to be
> determined statically), what else is there, besides argument count,
> that one can compare?

I'm working on an typing implementation right now that uses only arity to make 
sure that methods still comply with the interface description.  That's pretty 
much all you need.  I wish Ruby reported a little more clearly what 
parameters a method takes.  The arity values right now are primitive, and 
don't tell you how many optional arguments a method takes, doesn't 
discriminate between a fixed number of optional arguments and arguments taken 
as an array (*param), nor does it report when a &block is a required 
parameter.  My interface implementation would be helped greatly by more 
information.  Also, Ruby doesn't called method_added when a method is added 
directly to an object with <<.

	Sean O'Dell