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

See also “Occurrence Typing” in Typed Racket. [^1]

> One of Typed Racket’s distinguishing type system features is occurrence typing, which allows the type system to ascribe more precise types based on whether a predicate check succeeds or fails.

One of the big advantages is that it lets a text editor use the added information to supply better auto-complete suggestions. It also makes it possible to eliminate some safety checks at runtime because the type checker has ensured that certain calls will be safe based on prior conditional checks.

[^1]: https://docs.racket-lang.org/ts-guide/occurrence-typing.html



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

Search: