In order to provide Intellisense for Ruby, a language that does not have explicit typing, Ruby In Steel turns to type inference. The built-in inferencing can be aided by adding type assertions to a function, for instance:
#:return: => nil
#:arg: c => String
@field = c
The type assertion block can be automatically added by typing “##” in the line above the function/method declaration (it fills in the type with “Object” to start). I’m a proponent of explicit typing in non-trivial projects so this is potentially a big deal to me. What I need, though (consider this a feature request, SapphireSteel) is some form of FxCop-like reporting / enforcement of type assertion “coverage.”
That is, I would like to enforce a business rule “Ruby programs longer than 500 lines must have type assertions on all functions.” To me, this would be a win-win: you can develop as fast-and-loose as you want, but if you want to check code into a team project, you have to add type information (which, in my mind, is extremely important to the dominant task of understanding code).
To be sure, in my experience the “DocComments” facility in VS/C# (typing “///” triggers a documentation block for the parameters) is widely ignored and FxCop enforcement is resented, but I think documenting parameters in a strongly typed language often seems gratuitous (“string firstName: a string representing the first name” and so forth), while I think everyone admits that type information is helpful for comprehension.