Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin

Although this is great information I primarily had 'less pure' languages' in mind when I asked.

Come to think of it, restricting mutable access to only the relevant objects as per function call using const seems to allow just this!

A function having only const input and output "should be" free of side effects (if no global mutables); while still being allowed to run all manner of unpure processes local to its own calling context.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: