Daniel Schierbeck wrote:

> What if optional "type hinting", or, more accurately, "type conversion", 
> was added to the method definition syntax?
> 
>   def foo(str bar, i baz, sym bur)
>     # something
>   end
> 
> would then be the same as
> 
>   def foo(arg1, arg2, arg3)
>     bar, baz, bur = arg1.to_str, arg2.to_i, arg3.to_sym
>   end

I have implemented this in ruby-contract. Please see

http://ruby-contract.rubyforge.org/

-- 
http://flgr.0x42.net/