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

Anonymous records and variants are convenient in a scripting language because you don't have to declare them. This in turn leads to anonymous record types and anonymous sum types, which require something beyond HM for type inference, and I wanted to avoid introducing row variables.

TopShell uses type constraints for this, and I've never implemented a type constraint solver before TopShell. There are also some extra things to do around checking explicit type annotations, when the user provides them.



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: