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

The "pure" functions have different properties with respect to program optimization and program verification, in comparison with the functions or procedures with side effects.

That is the reason why this distinction matters. The distinction between mutable and immutable variables matters for the same reason.

Otherwise, the difference between a "procedure" and a "function" with side effects where you ignore the return value has no practical consequences.

There are contexts where you do not care about the optimizations that can be done by the compiler or about program verification, but there are also contexts where you care.



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

Search: