Functional programming principles

The functional programming (FP) paradigm pushes this reasoning further by considering computational design as being based on mathematical functions and the immutability of state and data. FP's guiding principle is that the entire computer program should be a single, referentially transparent expression. At its core, the concept of FP requires that functions be pure, referentially transparent and free of side effects. A function is pure when, given the same input, it always returns the same output. It is referentially transparent when its functional expression is interchangeable with its corresponding value anywhere inside a computer program. It is free of side effects when it does not modify an application's ...

Get Mastering The Faster Web with PHP, MySQL, and JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.