Re:Ask HN: What technology is “cutting edge” in 2022?
by apatheticonion on Monday January 24, 2022 @08:16AM
(#30057190)
Dumb question, is this expressed in TypeScript by the way it offers the ability to write logic inside types using keywords like `infer`, `extends`, `in`, etc?
[ Parent
| on HN ]
Re:Ask HN: What technology is “cutting edge” in 2022?
by bmn__ on Monday January 24, 2022 @09:07AM
(#30057666)
Not a dumb question. Answer is no, TS's features are in general not sufficient to express dependent types. It would need to stop making a distinction between types and values, and allow running arbitrary (total) functions in order to define a type, at the least. Experiment with a toy implementation: <https://thelittletyper.com/#pie>