From: Mike Furr Date: 2009-02-03T07:27:41+09:00 Subject: [ruby-core:21768] Re: New documentation system! Charles Oliver Nutter wrote: >> I still hold out hope for a sufficient degree of type inference >> to avoid this, though. > > H/M type inference can't handle inheritance, so I think we're going to > have to accept that limited type hints are necessary for Ruby. Unless > you had some other type inference mechanism in mind? This is getting slightly off-topic, but my research is exactly in this area and I have developed a static type inference algorithm that can type check many Ruby idioms. You can read about the project here[1]. However, I don't want to divert this thread off-topic going into static typing :) We currently only require annotations in two places: 1) for code written in C and 2) for introducing parametric classes and methods. I would love to have access to an officially supported annotation language though. As it stands now, I wrote my own Ruby parser that allows annotations before classes and methods (like RDoc), but also supports type annotations on individual expressions. Since a major benefit of static checking is the *verified* documentation, a unified API for annotations would make this more accessible. -Mike 1 - http://www.cs.umd.edu/projects/PL/druby/