Think in Morphisms
Following the three functional principles, we can be sure to write functional code, but they can only tell us what code we should avoid, not how to design our application. We need to start thinking in functional terms, but how?
This is extremely different from object-oriented design. Alan Kay—who invented the term object-oriented—described his idea in a famous email:[68] “I thought of objects being like biological cells and/or individual computers on a network, only able to communicate with messages (so messaging came at the very beginning—it took a while to see how to do messaging in a programming language efficiently enough to be useful).”
To give an intuitive idea of the differences, in a pure object-oriented design, everything ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access