4 ms·
>Functional code is often preferred due to its clarity, both humans and machines have easier time reasoning about it, and even formally proving its properties.
by marcinzm 6y ago
>Functional code is often preferred due to its clarity, both humans and machines have easier time reasoning about it, and even formally proving its properties. Sometimes it is just more important than raw speed, but sometimes allows for more aggressive optimizations (rewriting by the compiler) and higher speed.
I'm curious if that's really the case in practice. Functional code allows for clever concise implementations and clever concise implementations are notoriously hard to read. Go, for example, is often lauded for it's readability due to it's more verbose and non-clever nature.
edit: To clarify, I mean readability by the above-average programmer not by a world expert who has spent 15 years becoming one with the language.