Hacker News new | comments | show | ask | jobs | submit login

To amplify what another has said, the emphasis of functional programming is side-effect-free code, where the default assumption is that functions don't have side effects, and so can be treated as components in a pipeline that modifies data step-by-step from its initial input state to its final output state.

Ideally, these components are composable and reusable, both to facilitate reasoning about the code and code reuse. The Haskell Standard Prelude is a fantastic example of this working out well.

Basically, it's based on the idea that the functions which are easiest to reason about are those with one well-defined input and one well-defined output which is completely determined by that input. You can't always have this, but functional languages attempt to get you as close as possible. The simplicity of pipeline-style programming is one of the happy little dividends of this kind of thinking.

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