Comment

Comment by jonathanpoulter

Ease of testing is the most obvious benefit.

A "pure" function is one whose result is simply based on its inputs, no dependency on external state/IO etc. Same inputs, same outputs guaranteed.

These types of functions, are really easy to reason about and unit test. State is often messy.

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton