3 ms·
Typed Racket <https://docs.racket-lang.org/ts-guide/> https://docs.racket-lang.org/ts-guide/> is pretty successful in the Racket community. It's also prompted
by raattgift 11y ago
Typed Racket <https://docs.racket-lang.org/ts-guide/> https://docs.racket-lang.org/ts-guide/> is pretty successful in the Racket community. It's also prompted some pessimistic papers about gradual sound typing, since it's hard to avoid a performance hit when imposing type safety on untyped code using contracts. On the other hand, that performance hit is in part typechecker/compiler implementation dependent and in part dependent on the granularity of the added typing (e.g. typing modules or functions vs typing subexpressions).
Typed Racket code often gains a speedup over untyped Racket, since sound typing allows the elision of contracts and other runtime overheads for safety. There is no penalty at all for invoking Typed Racket code from untyped code, either in terms of performance or in terms of what the untyped-language programmer needs to know.
- samth 11y agoNote that we've made big improvements in the performance of Typed Racket's generated contracts just since that paper was written, so many things are now better.