Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is there good library support for typed-racket?


You can use any Racket lib, with the caveat that importing from an untyped lib requires the user to state the type.


So 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-interact...


Yes 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.


With the caveat that typed racket does not have any unsound corners of the type system, not even for comfort.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: