1. 7
  1.  

  2. 2

    This looks like contracts for method calls. I was almost expecting a static checker. Well played.

    Completely unrelated, I love how a ruby typecheck paper ends up with the file name “oops13”.

    1. 3

      Yep. Definitely more of a Ruby Contract System.

      When the programmer uses rtc annotate to add a type to an existing object, rtc wraps the original object in a proxy that also contains the type. The proxy de- fines a method missing method, which in Ruby receives a call when calling an undefined method on the object.4 Calls to the proxy first ensure the arguments are of the appropriate type, then delegate to the original object, and finally check the return value’s type before returning to the callee. The general idea of proxy wrapping is borrowed from Rubydust, though rtc does not perform constraint generation.

      Cue the standard “those aren’t even types!” + “it’s popular to call runtime tags ‘types’” semantic debates.