Sean Russell wrote:

> My proposed solution is to have Ruby do a duck-typing check as part of
> the syntax checker ("-c").  This would be duck-type inferrence, so it
> doesn't require the programmer to declare variables or give them
> types.  It would simply raise a warning if someone tries to call
> "5.collect".  

Well, here's one comment.

   if foo()
     def 5.collect
       puts "I exist!"
     end
   end

Of course, Fixnums can't have singleton methods now. Later, I think they
may.

The point is, methods may be added/deleted/redefined at runtime. This
makes static checking very difficult in the general case.


Hal