3 ms·
It blows my mind that most HN users are still impressed by algebraic types but haven't heard about set theoretic types.
by cubefox 2mo ago
It blows my mind that most HN users are still impressed by algebraic types but haven't heard about set theoretic types.
- KPGv2 2mo agoThey probably just don't know the name. STT is what TypeScript uses, and that's pretty well-known, though a lot of the STT power is considered "advanced typing." I write a lot in other language that uses ADTs, and I really miss STTs for the ease by which I can construct a "Partial" data type with significantly less boilerplate. Of course, it also enables laziness, as instead of considerig whether it's proper to have a specific Partial product type, I just create it and move on. Easier to break loosey-goosey on modeling the domain.
- mamcx 2mo agoThere is not much material I can find out, maybe only https://elixir-lang.org/blog/2023/09/20/strong-arrows-gradual-typing/ https://elixir-lang.org/blog/2023/09/20/strong-arrows-gradua... that is kind of practical?