News for hackers. Stuff that matters.
Re:What the heck are reverse mapped types? by lifthrasiir on Sunday August 18, 2024 @04:11AM (#41280923)
An inverse function.

While technically used like types, TypeScript "types" are really compile-time values that happen to be also usable for constraining usual run-time values like types. These compile-time values themselves do not have much types, so you can easily get errors from compile-time evaluations (which is different from compile-time type errors!). Likewise, most TypeScript type-level constructs are really long-winded methods to do the compile-time computation and have no straightforward equivalents in type systems that do guarantee the soundness and coherence (which have specific definitions).

Re:What the heck are reverse mapped types? by Kinrany on Monday August 19, 2024 @06:38AM (#41289733)
Since there's no previous stage where compile-time expressions could be type checked, the best they can have is strong dynamic typing, no?
Re:What the heck are reverse mapped types? by lifthrasiir on Monday August 19, 2024 @10:32AM (#41291388)
Not quite, because the previous stage can be dynamically generated as needed.