Hacker News new | past | comments | ask | show | jobs | submit login

This is indeed interesting, and this is why I'm missing something like func <A, B> Map(f func(A) B, input []A) []B that would statically check the A and B types at a call site.

BTW it looks like less work at compile time than the elaborate run-time solution that you linked to. It probably will not even require generation of specialized versions for primitive types.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

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

Search: