tupl-tufts / rdl

Types, type checking, and contracts for Ruby
BSD 3-Clause "New" or "Revised" License
602 stars 38 forks source link

Allow calling of untyped code from typed code #37

Open ptarjan opened 7 years ago

ptarjan commented 7 years ago

Would it be possible to allow calling of untyped code? I see in the implementation that this is disallowed, so I'm mostly asking if you are philosophically opposed to this or if this is a current implementation detail.

One thing we did for Hack at Facebook was had an annotation in the file saying if it was strict and in those files they wouldn't allow outbound calls to unchecked code, but for non-strict files you could call untyped code and it would do inference as best it could and mark as Any when it can't.

tonyhb commented 6 years ago

+1 I'm struggling with this right now. Gradual typing is OK, but when you need to call out to untyped code it breaks everything.