2 ms·
I think that Racket vs Typed Racked is a good example. https://docs.racket-lang.org/ts-guide/ https://docs.racket-lang.org/ts-guide/ Ideally, you can pick a pr
by gus_massa 8y ago
I think that Racket vs Typed Racked is a good example. https://docs.racket-lang.org/ts-guide/ https://docs.racket-lang.org/ts-guide/
Ideally, you can pick a program in Racket that doesn't specify any type, add annotations for the types of the arguments of functions and the temporal variables, and the compiler will infer the missing parts and ensure that there are not errors in the types. In some programs the compiler need some help, with a few additional annotations.
You can use the type "Any" that means "whatever", but then you must check that the variable has the type that is necessary before using it.