Sets, types and type checking

(kaleidawave.github.io)

43 points | by kaleidawave a day ago ago

4 comments

  • throwaway17_17 2 hours ago

    I don’t think it is appropriate to say Rust has ‘union types’. Rust has sum types, implemented as Enums and (unsafe) Union types. There is a distinct difference between sum types and union types from a type theoretic perspective.

  • o11c 2 hours ago

    `never` is better known as `bottom`. `noreturn` in some languages is the same thing

    `any`, however, is not `top`, it is `break_the_type_system`. The top type in TS is `unknown`.

  • skybrian 4 hours ago

    > Like sets, types can be by description have an infinite number of distinct entries

    I think they might have meant "entities" instead of "entries?"

    The term "diagonal identity" seems to be non-standard as well?

    • dec0dedab0de 3 hours ago

      I usually say items or members, but entries basically means the same thing, and js set objects have an entries method, so there is precedence.