4 ms·
You can use any Racket lib, with the caveat that importing from an untyped lib requires the user to state the type.
by rscho 5y ago
You can use any Racket lib, with the caveat that importing from an untyped lib requires the user to state the type.
- tym0 5y agoSo it doesn't infer types for libraries not marked as `#lang typed/racket`? You need to write your own types like you would using a Javascript library from Typescript? Edit: Found the relevant part of the docs[1], I like the automatic contract enforcement, although I guess it would be kinda hard to guess the perf impact... [1] https://docs.racket-lang.org/ts-guide/typed-untyped-interaction.html https://docs.racket-lang.org/ts-guide/typed-untyped-interact...
- xfer 5y agoYes typed racket works the same as typescript. But it's an earlier work. Typescript probably took inspirations from it along with others. Typed-racket has some form of refinement types now as well.
- bjoli 5y agoWith the caveat that typed racket does not have any unsound corners of the type system, not even for comfort.