Hacker News new | ask | show | jobs
by curun1r 3279 days ago
The funny thing is that there are languages that allow constants into the type system. The feature has a few names, but one of them is pi-types (well, π-types) [1]. Go even uses them for its array types. However like generics, it's not a feature of the type system that can be used outside the built-in types.

[1] https://en.wikipedia.org/wiki/Dependent_type#Formal_definiti...