4 ms·
Typed Racket[1] has the advantage of being completely inter-operable with dynamically typed Racket - I can (and have) imported dynamically typed modules and use
by chimeracoder 14y ago
Typed Racket[1] has the advantage of being completely inter-operable with dynamically typed Racket - I can (and have) imported dynamically typed modules and used them in (statically) typed modules, as well as imported (statically) typed modules and used them in dynamically typed ones.
You can even turn off the static type checking while keeping the type annotations. Not to mention that the type system is incredibly powerful and expressive.
It's literally the best of both worlds.
[1] http://docs.racket-lang.org/ts-guide/ http://docs.racket-lang.org/ts-guide/
- mahmud 14y agoTyped Racket's static-dynamic is due to its module system: modules allow for seperate compilation, and the type-checker accepts accepts fully typed modules, not mix-code fragments. However, Siek's Gradual Typing does handle mix-type expressions at finer-grain.
- samth 14y agoYou can use the `with-type` form to embed typed expressions in larger untyped modules in Racket. Also, submodules let you accomplish more of this as well, without needing to put your modules in separate files.