Y
Hacker News
new
|
ask
|
show
|
jobs
by
aw1621107
1232 days ago
I think what you're describing is basically dependent types [0], where types can depend on values.
[0]:
https://en.wikipedia.org/wiki/Dependent_type