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

It's hard to avoid this, even in a functional language like OCaml (which has mutable ref cells).

Haskell does a pretty good job, by requiring functions that have side effects to show it in their type signature. If you're doing Haskell right, the number of functions that have side effects is very small as a proportion of the number of functions you'll write in total, so most functions you write will be purely referentially transparent. Of course, I'd argue that this is true if you're using any high-level language properly, except possibly in GUI programming.



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

Search: