3 ms·
I'm definitely in favour of gradual typing but runtime checking is already really easy to do if that's what you want. Just add a rightward assignment patten ma
by Lio 1y ago
I'm definitely in favour of gradual typing but runtime checking is already really easy to do if that's what you want. Just add a rightward assignment patten match to your method. e.g.
def somemethod(foo, bar)
foo => Integer
bar => MyBarClass
end
Personally I think the RBS-Inine format is the way forward. Sorbet has experimental support for it too.
https://sorbet.org/docs/rbs-support https://sorbet.org/docs/rbs-support