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

The types of the vectors: the length is a generic parameter to the type. So a Vec 4 Int and a Vec 5 Int are different types.


Oh right, the output is parametrized by the input. I suppose this is what dependent types are.

That's really awesome. Thanks for the explanation.


> Oh right, the output is parametrized by the input. I suppose this is what dependent types are.

Dependent types is really about the ability to parameterise types over values, and reason on those values-dependent types.




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

Search: