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

Or lets look at persistent data structures, a staple of functional programming:

https://github.com/tobgu/peds

Notice how you'd need to generate the DS for every type you'd like to use it with, which is not the case with built in mutable maps and slices.

To make them type-safe, you need to generate them for every type you use. While this is technically possible, it does make the language quite hostile towards functional programming. With generics, this is rectified but the problem with non-composable multi-return-value functions still remains



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

Search: