3 ms·
We did typed racket in school[1]. It helps me wrap my brain around the concept. In if then statements, both branches must return the same type, and the whole st
by djha-skin 4y ago
We did typed racket in school[1]. It helps me wrap my brain around the concept. In if then statements, both branches must return the same type, and the whole statement is typed to that type, for example. It is pretty limiting, but hey, lisp is the programming language you can use to make other programming languages. I do agree though; common lisp and its `declare` statements hit the sweet spot for me.
1: https://docs.racket-lang.org/ts-guide/ https://docs.racket-lang.org/ts-guide/
- bandrami 4y agoI get expression typing (which as you point out `declare` does very well). I just don't understand how you can either 1. Do static typing with manifest-typed values that can be assigned to arbitrary symbols, or 2. Do Lisp in any real sense without #1
- JonChesterfield 4y agoIt's through "gradual" typing. You check what you can as early as you wish and emit dynamic checks for the remainder. There was a claim a while ago that gradual typing is inherently slower than static or dynamic, but that sounds like an implementation bug to me, not anything fundamental.